提交 ee915f91 authored 作者: David Warde-Farley's avatar David Warde-Farley

BUG: Take care of -framework arguments on OS X with -Xcompiler.

上级 d1aa9482
...@@ -136,6 +136,19 @@ def nvcc_module_compile_str(module_name, src_code, location=None, include_dirs=[ ...@@ -136,6 +136,19 @@ def nvcc_module_compile_str(module_name, src_code, location=None, include_dirs=[
cmd.extend(['-l%s'%l for l in libs]) cmd.extend(['-l%s'%l for l in libs])
if sys.platform == 'darwin': if sys.platform == 'darwin':
cmd.extend(darwin_python_lib.split()) cmd.extend(darwin_python_lib.split())
if sys.platform == 'darwin':
done = False
while not done:
try:
indexof = cmd.index('-framework')
newarg = '-Xcompiler', ','.join(cmd[indexof:(indexof + 2)])
cmd.pop(indexof) # Remove -framework
cmd.pop(indexof) # Remove argument to -framework
cmd.extend(newarg)
except ValueError, e:
done = True
#cmd.append("--ptxas-options=-v") #uncomment this to see register and shared-mem requirements #cmd.append("--ptxas-options=-v") #uncomment this to see register and shared-mem requirements
#print >> sys.stderr, 'COMPILING W CMD', cmd #print >> sys.stderr, 'COMPILING W CMD', cmd
debug('Running cmd', ' '.join(cmd)) debug('Running cmd', ' '.join(cmd))
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论