To protect your data, the CISO officer has suggested users to enable GitLab 2FA as soon as possible.

Commit d78ce170 authored by John Zhang's avatar John Zhang
Browse files

environment variable refactoring; add -fPIC on to flags

parent ffb49130
......@@ -106,10 +106,8 @@ class RPython(Language):
env = task.env
if lc['backend'] == 'mu':
suplibdir = str(task.output_dir)
if sys.platform == 'darwin':
env['DYLD_LIBRARY_PATH'] = suplibdir
else:
env['LD_LIBRARY_PATH'] = suplibdir
libpath_var = 'DYLD_LIBRARY_PATH' if sys.platform == 'darwin' else 'LD_LIBRARY_PATH'
env[libpath_var] = "%s:%s" % (suplibdir, env[libpath_var])
if lc['impl'] == 'holstein':
mu_holstein_dir = Path(env['MU_HOLSTEIN'])
......
......@@ -69,11 +69,12 @@ class TaskSet:
# compiled callback shared library
if sys.platform == 'darwin':
self.env['DYLD_LIBRARY_PATH'] = str(self.output_dir)
libpath_var = 'DYLD_LIBRARY_PATH'
libext = '.dylib'
else:
self.env['LD_LIBRARY_PATH'] = str(self.output_dir)
libpath_var = 'LD_LIBRARY_PATH'
libext = '.so'
self.env[libpath_var] = '%s:%s' % (self.output_dir, self.env.get(libpath_var, ""))
self.callback['dylib'] = self.output_dir / ('libcb_%(name)s' % self.callback + libext)
@staticmethod
......@@ -212,7 +213,7 @@ class TaskSet:
cc = self.env.get('CC', 'clang')
cmd.append(cc)
cmd.append('--shared')
cmd.extend(['-shared', '-fPIC'])
# include_dirs
for d in self.callback['include_dirs']:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment