diff --git a/aedi/target/base.py b/aedi/target/base.py index a8adaf10..15c8ab49 100644 --- a/aedi/target/base.py +++ b/aedi/target/base.py @@ -114,7 +114,7 @@ class BuildTarget(Target): if cxx_compiler := state.cxx_compiler(): env['CXX'] = str(cxx_compiler) - for prefix in ('AR', 'C', 'CPP', 'CXX', 'OBJC', 'OBJCXX'): + for prefix in ('C', 'CPP', 'CXX', 'OBJC', 'OBJCXX'): state.update_environment(f'{prefix}FLAGS', f'-I{state.include_path}') state.update_environment('LDFLAGS', f'-L{state.lib_path}') diff --git a/aedi/target/library_tier1.py b/aedi/target/library_tier1.py index dc783c19..0baa64e2 100644 --- a/aedi/target/library_tier1.py +++ b/aedi/target/library_tier1.py @@ -516,7 +516,8 @@ class QuasiGlibTarget(BuildTarget): os.makedirs(lib_path, exist_ok=True) commands = ( - (state.cxx_compiler(), '-std=c++11', '-O3', '-c', state.patch_path / f'{self.name}.cpp'), + [state.cxx_compiler(), '-std=c++11', '-O3', '-c', state.patch_path / f'{self.name}.cpp'] + + shlex.split(state.environment['CXXFLAGS']), (state.host() + '-ar', '-crs', lib_path / f'lib{self.name}.a', f'{self.name}.o'), )