Skip to content

Commit

Permalink
Don't call contains_commit inside setup()
Browse files Browse the repository at this point in the history
The repository might not be cloned yet.
  • Loading branch information
arichardson committed Feb 8, 2024
1 parent ec25ebe commit bbc4e64
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions pycheribuild/projects/cross/libcxx.py
Original file line number Diff line number Diff line change
Expand Up @@ -499,13 +499,6 @@ def setup(self):
LIBCXX_ENABLE_RTTI=True, # Ensure typeinfo symbols are always available
LIBCXX_TEST_TARGET_FLAGS=target_test_flags,
)
if GitRepository.contains_commit(self, "64d413efdd76f2e6464ae6f578161811b9d12411", src_dir=self.source_dir):
self.add_cmake_options(LIBCXX_HARDENING_MODE="extensive")
else:
self.add_cmake_options(LIBCXX_ENABLE_ASSERTIONS=True)
# Need to export the symbols from debug.cpp to allow linking code that defines _LIBCPP_DEBUG=1
self.add_cmake_options(LIBCXX_ENABLE_BACKWARDS_COMPATIBILITY_DEBUG_MODE_SYMBOLS=True)

if external_cxxabi is not None:
self.add_cmake_options(LIBCXX_CXX_ABI=external_cxxabi)
if not self.compiling_for_host():
Expand Down Expand Up @@ -599,6 +592,16 @@ def setup_config_options(cls, **kwargs):
kind=int,
)

def configure(self, **kwargs) -> None:
if "libcxx" in self.get_enabled_runtimes():
if GitRepository.contains_commit(self, "64d413efdd76f2e6464ae6f578161811b9d12411", src_dir=self.source_dir):
self.add_cmake_options(LIBCXX_HARDENING_MODE="extensive")
else:
self.add_cmake_options(LIBCXX_ENABLE_ASSERTIONS=True)
# Need to export the symbols from debug.cpp to allow linking code that defines _LIBCPP_DEBUG=1
self.add_cmake_options(LIBCXX_ENABLE_BACKWARDS_COMPATIBILITY_DEBUG_MODE_SYMBOLS=True)
super().configure(**kwargs)

def compile(self, **kwargs):
if self.qemu_instance is not None:
config_contents = generate_ssh_config_file_for_qemu(
Expand Down

0 comments on commit bbc4e64

Please sign in to comment.