Skip to content

Commit 7b74ed6

Browse files
committed
pixi: Use a script to setup clang-cl
1 parent ecad773 commit 7b74ed6

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

pixi.toml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,10 +75,12 @@ python = "3.12.*"
7575
[feature.py39.dependencies]
7676
python = "3.9.*"
7777

78-
# Use clang-cl on Windows
78+
# Use clang-cl on Windows.
79+
# We must use scripts instead of env to setup CC and CXX
80+
# to avoid cxx-compiler to overwrite them.
7981
[feature.clang-cl]
8082
platforms = ["win-64"]
81-
activation = { env = { CC = "clang-cl", CXX = "clang-cl" } }
83+
activation = { scripts = ["scripts/activation_clang_cl.bat"] }
8284

8385
[environments]
8486
default = { features = ["py312"], solve-group = "py312" }
@@ -89,7 +91,7 @@ py39 = { features = ["py39"], solve-group = "py39" }
8991
all = { features = ["all", "py312"], solve-group = "py312" }
9092
all-py39 = { features = ["all", "py39"], solve-group = "py39" }
9193
all-clang-cl = { features = [
92-
"clang-cl",
9394
"all",
95+
"clang-cl",
9496
"py312",
9597
], solve-group = "py312" }

scripts/activation_clang_cl.bat

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
:: Setup clang-cl compiler
2+
set CC=clang-cl
3+
set CXX=clang-cl

0 commit comments

Comments
 (0)