From fb304e141a44bdc19c8c0909dbf2a49dfb8c0847 Mon Sep 17 00:00:00 2001 From: Andrej730 Date: Fri, 3 Oct 2025 13:12:32 +0500 Subject: [PATCH] build-all.py - note on doubled compilation times --- nix/build-all.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/nix/build-all.py b/nix/build-all.py index a8f4cb7db9..7bf77e15d9 100644 --- a/nix/build-all.py +++ b/nix/build-all.py @@ -1368,6 +1368,9 @@ if "IfcOpenShell-Python" in targets: if "wasm" in flags: ADDITIONAL_ARGS = f"-Wl,-undefined,suppress -sSIDE_MODULE=2 -sEXPORTED_FUNCTIONS=_PyInit__ifcopenshell_wrapper" + # NOTE: We don't use `CXXFLAGS` for wrappers, so wrapper is compiled with different flags + # (e.g. ` -fdata-sections` is missing, which is set by default for executables) + # So cache doesn't match and running build-all.py builds most of ifcopenshell libraries twice. os.environ["CPPFLAGS"] = f"{CXXFLAGS_MINIMAL} {ADDITIONAL_ARGS}" os.environ["CXXFLAGS"] = f"{CXXFLAGS_MINIMAL} {ADDITIONAL_ARGS}" os.environ["CFLAGS"] = f"{CFLAGS_MINIMAL} {ADDITIONAL_ARGS}"