Fix unintended changing of CXXFLAGS after building bundled libcapnp
This commit is contained in:
@@ -13,8 +13,8 @@ def build_libcapnp(bundle_dir, build_dir, verbose=False):
|
|||||||
stdout = f
|
stdout = f
|
||||||
if verbose:
|
if verbose:
|
||||||
stdout = None
|
stdout = None
|
||||||
cxxflags = os.environ.get('CXXFLAGS', '')
|
cxxflags = os.environ.get('CXXFLAGS', None)
|
||||||
os.environ['CXXFLAGS'] = cxxflags + ' -fPIC -O2 -DNDEBUG'
|
os.environ['CXXFLAGS'] = (cxxflags or '') + ' -fPIC -O2 -DNDEBUG'
|
||||||
conf = subprocess.Popen(['./configure', '--disable-shared', '--prefix', build_dir], cwd=capnp_dir, stdout=stdout)
|
conf = subprocess.Popen(['./configure', '--disable-shared', '--prefix', build_dir], cwd=capnp_dir, stdout=stdout)
|
||||||
returncode = conf.wait()
|
returncode = conf.wait()
|
||||||
if returncode != 0:
|
if returncode != 0:
|
||||||
@@ -22,5 +22,9 @@ def build_libcapnp(bundle_dir, build_dir, verbose=False):
|
|||||||
|
|
||||||
make = subprocess.Popen(['make', '-j4', 'install'], cwd=capnp_dir, stdout=stdout)
|
make = subprocess.Popen(['make', '-j4', 'install'], cwd=capnp_dir, stdout=stdout)
|
||||||
returncode = make.wait()
|
returncode = make.wait()
|
||||||
|
if cxxflags is None:
|
||||||
|
del os.environ['CXXFLAGS']
|
||||||
|
else:
|
||||||
|
os.environ['CXXFLAGS'] = cxxflags
|
||||||
if returncode != 0:
|
if returncode != 0:
|
||||||
raise RuntimeError('Make failed')
|
raise RuntimeError('Make failed')
|
||||||
|
|||||||
Reference in New Issue
Block a user