Fix for compiler flags when THEANO_BLAS_LDFLAGS is not defined

上级 cf4b20c1
...@@ -24,9 +24,9 @@ def ldflags(libs=True, flags=False): ...@@ -24,9 +24,9 @@ def ldflags(libs=True, flags=False):
Default: ['blas'], but environment variable THEANO_BLAS_LDFLAGS overrides this. Default: ['blas'], but environment variable THEANO_BLAS_LDFLAGS overrides this.
""" """
rval = []
if os.getenv('THEANO_BLAS_LDFLAGS'): if os.getenv('THEANO_BLAS_LDFLAGS'):
tokens = os.getenv('THEANO_BLAS_LDFLAGS').split() tokens = os.getenv('THEANO_BLAS_LDFLAGS').split()
rval = []
for t in tokens: for t in tokens:
try: try:
t0, t1, t2 = t[0:3] t0, t1, t2 = t[0:3]
...@@ -39,7 +39,7 @@ def ldflags(libs=True, flags=False): ...@@ -39,7 +39,7 @@ def ldflags(libs=True, flags=False):
rval.append(t[2:]) rval.append(t[2:])
elif flags and t1!='l': # example -openmp elif flags and t1!='l': # example -openmp
rval.append(t) rval.append(t)
else: elif libs:
rval = ['blas'] rval = ['blas']
#print "blas linking against", rval #print "blas linking against", rval
return rval return rval
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论