提交 4e231aaa authored 作者: Dumitru Erhan's avatar Dumitru Erhan

added option that, bu default, disables linking against -framework. Re-enable,…

added option that, bu default, disables linking against -framework. Re-enable, if needed, by setting cmodule.mac_framework_link to True
上级 b7e570c6
...@@ -52,3 +52,7 @@ AddConfigVar('cuda.root', ...@@ -52,3 +52,7 @@ AddConfigVar('cuda.root',
AddConfigVar('gpuelemwise.sync', AddConfigVar('gpuelemwise.sync',
"when true, wait that the gpu fct finished and check it error code.", "when true, wait that the gpu fct finished and check it error code.",
BoolParam(True)) BoolParam(True))
AddConfigVar('cmodule.mac_framework_link',
"If set to true, breaks certain mac installations with the infamous Bus Error",
BoolParam(False))
...@@ -625,8 +625,11 @@ def gcc_module_compile_str(module_name, src_code, location=None, include_dirs=[] ...@@ -625,8 +625,11 @@ def gcc_module_compile_str(module_name, src_code, location=None, include_dirs=[]
#DSE Patch 1 for supporting OSX frameworks; add -framework Python #DSE Patch 1 for supporting OSX frameworks; add -framework Python
if sys.platform=='darwin' : if sys.platform=='darwin' :
preargs.extend(['-undefined','dynamic_lookup']) preargs.extend(['-undefined','dynamic_lookup'])
#if python_inc.count('Python.framework')>0 : # link with the framework library *if specifically requested*
# preargs.extend(['-framework','Python']) # config.mac_framework_link is by default False, since on some mac
# installs linking with -framework causes a Bus Error
if python_inc.count('Python.framework')>0 and config.cmodule.mac_framework_link:
preargs.extend(['-framework','Python'])
workdir = location workdir = location
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论