aboutsummaryrefslogtreecommitdiffstats
path: root/build_scripts
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2021-01-08 11:22:33 +0100
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2021-01-11 16:02:03 +0000
commit4de06c634f451e96b47f31324e34086b0e3a0d62 (patch)
tree9b315326c504c6904d374957e08e3068c57ac2fb /build_scripts
parent98aba46414b666c27df3904d2b4313f0a16e05dc (diff)
Windows: Fix running the example tests in COIN
Move the logic expanding the Clang-related variables introduced by c3fc507d3b2a502273bd92472e1e7aa459c2d13e to the COIN scripts since they are needed when building the sample binding. c3fc507d3b2a502273bd92472e1e7aa459c2d13e should then be reverted. Task-number: PYSIDE-431 Change-Id: I1f118fdbd8989b7b9e3d24a249af81f4020c73f3 Reviewed-by: Simo Fält <simo.falt@qt.io> (cherry picked from commit 01b1d3218d70d128fe6c2f2ce3e6dce74608adaa) Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Diffstat (limited to 'build_scripts')
-rw-r--r--build_scripts/utils.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/build_scripts/utils.py b/build_scripts/utils.py
index 767ed46af..0cf6f6676 100644
--- a/build_scripts/utils.py
+++ b/build_scripts/utils.py
@@ -667,6 +667,16 @@ def find_glob_in_path(pattern):
return result
+# Expand the __ARCH_ place holder in the CLANG environment variables
+def expand_clang_variables(target_arch):
+ for var in 'LLVM_INSTALL_DIR', 'CLANG_INSTALL_DIR':
+ value = os.environ.get(var)
+ if value and '_ARCH_' in value:
+ value = value.replace('_ARCH_', target_arch)
+ os.environ[var] = value
+ print(f"{var} = {value}")
+
+
# Add Clang to path for Windows for the shiboken ApiExtractor tests.
# Revisit once Clang is bundled with Qt.
def detect_clang():