Skip to content

Commit

Permalink
Fix incorrect variable name while handling CPython debug builds
Browse files Browse the repository at this point in the history
  • Loading branch information
ronaldoussoren committed May 26, 2021
1 parent c6c9acf commit 63597c6
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions pyobjc-core/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ def get_sdk_level(sdk):
# "--analyze",
"-Werror",
"-I/usr/include/ffi",
# "-fvisibility=hidden",
# "-O3", "-flto",
]

Expand All @@ -96,11 +97,13 @@ def get_sdk_level(sdk):
"Foundation",
"-framework",
"Carbon",
"-fvisibility=protected",
# "-fvisibility=protected",
"-g",
"-lffi",
# "-fsanitize=address", "-fsanitize=undefined", "-fno-sanitize=vptr",
# "-O3", "-flto"
"-fvisibility=hidden",
"-O3",
"-flto",
]


Expand Down Expand Up @@ -131,7 +134,7 @@ def get_sdk_level(sdk):
# Running with Py_DEBUG, reduce optimization level
# to make it easier to debug the code.
cfg_vars = get_config_vars()
for k in vars:
for k in cfg_vars:
if isinstance(cfg_vars[k], str) and "-O2" in cfg_vars[k]:
cfg_vars[k] = cfg_vars[k].replace("-O2", "-O1 -g")
elif isinstance(cfg_vars[k], str) and "-O3" in cfg_vars[k]:
Expand Down

0 comments on commit 63597c6

Please sign in to comment.