9696 llvm-mingw-*.tar.xz
9797 retention-days : 7
9898
99- linux-profile :
100- needs : [prepare, linux-stage1]
101- runs-on : ubuntu-22.04
102- steps :
103- - uses : actions/checkout@v4
104- - uses : actions/download-artifact@v4
105- with :
106- name : linux-stage1-ucrt-x86_64-toolchain
107- - name : Unpack stage1 Clang
108- run : |
109- tar -Jxf llvm-mingw-*.tar.xz
110- rm llvm-mingw-*.tar.xz
111- mv llvm-mingw* llvm-mingw-stage1
112- - name : Build
113- env :
114- LLVM_VERSION : ${{needs.prepare.outputs.LLVM_VERSION}}
115- TAG : ${{needs.prepare.outputs.TAG}}
116- SOURCE_DATE_EPOCH : ${{needs.prepare.outputs.COMMIT_DATE_UNIX}}
117- BUILD_DATE : ${{needs.prepare.outputs.BUILD_DATE}}
118- run : |
119- # Build LLVM in mostly the same way as it is going to be built in the
120- # final form.
121- LLVM_CMAKEFLAGS="-DLLVM_ENABLE_LIBXML2=OFF -DLLDB_ENABLE_PYTHON=OFF" ./build-all.sh --profile $(pwd)/llvm-mingw-stage1
122- - uses : actions/upload-artifact@v4
123- with :
124- name : profile
125- path : |
126- profile.profdata
127- retention-days : 7
128-
12999 # Build a cross compiler for Linux, targeting Windows.
130100 linux :
131- needs : [prepare, linux-stage1, linux-profile ]
101+ needs : [prepare, linux-stage1]
132102 runs-on : ubuntu-22.04
133103 steps :
134104 - uses : actions/checkout@v4
@@ -140,20 +110,20 @@ jobs:
140110 tar -Jxf llvm-mingw-*.tar.xz
141111 rm llvm-mingw-*.tar.xz
142112 sudo mv llvm-mingw* /opt/llvm-mingw
143- - uses : actions/download-artifact@v4
144- with :
145- name : profile
113+ echo /opt/llvm-mingw/bin >> $GITHUB_PATH
146114 - name : Build
147115 env :
148116 LLVM_VERSION : ${{needs.prepare.outputs.LLVM_VERSION}}
149117 TAG : ${{needs.prepare.outputs.TAG}}
150118 SOURCE_DATE_EPOCH : ${{needs.prepare.outputs.COMMIT_DATE_UNIX}}
151119 BUILD_DATE : ${{needs.prepare.outputs.BUILD_DATE}}
152120 run : |
121+ mkdir -p install
122+ cp -a /opt/llvm-mingw install
153123 # Skip dynamic library dependencies that might make it harder to
154124 # run the binaries on other distros (and that have little use within
155125 # llvm-mingw).
156- LLVM_CMAKEFLAGS="-DLLVM_ENABLE_LIBXML2=OFF -DLLDB_ENABLE_PYTHON=OFF" ./build-all.sh /opt/llvm-mingw $(pwd)/install/llvm-mingw --thinlto --pgo --llvm-only
126+ LLVM_CMAKEFLAGS="-DLLVM_ENABLE_LIBXML2=OFF -DLLDB_ENABLE_PYTHON=OFF" ./build-all.sh $(pwd)/install/llvm-mingw --with-clang --thinlto --llvm-only
157127 .github/workflows/store-version.sh install/llvm-mingw/versions.txt
158128 ./test-libcxx-module.sh $(pwd)/install/llvm-mingw
159129 ./run-tests.sh $(pwd)/install/llvm-mingw
@@ -172,7 +142,7 @@ jobs:
172142 # Crosscompile the toolchain for running on Linux on a different architecture, bundle the runtime
173143 # libraries that were built in the 'linux' step above.
174144 linux-cross-aarch64 :
175- needs : [linux-stage1, linux-profile, prepare]
145+ needs : [linux-stage1, prepare]
176146 runs-on : ubuntu-22.04
177147 steps :
178148 - uses : actions/checkout@v4
@@ -184,17 +154,15 @@ jobs:
184154 tar -Jxf llvm-mingw-*.tar.xz
185155 rm llvm-mingw-*.tar.xz
186156 sudo mv llvm-mingw* /opt/llvm-mingw
187- - uses : actions/download-artifact@v4
188- with :
189- name : profile
157+ echo /opt/llvm-mingw/bin >> $GITHUB_PATH
190158 - name : Build
191159 env :
192160 LLVM_VERSION : ${{needs.prepare.outputs.LLVM_VERSION}}
193161 MINGW_W64_VERSION : ${{needs.prepare.outputs.MINGW_W64_VERSION}}
194162 SOURCE_DATE_EPOCH : ${{needs.prepare.outputs.COMMIT_DATE_UNIX}}
195163 run : |
196164 sudo apt-get update && sudo apt-get install g++-aarch64-linux-gnu
197- ./build-all.sh /opt/llvm-mingw $(pwd)/install/llvm-mingw --no-runtimes --host=aarch64-linux-gnu --thinlto --pgo
165+ ./build-all.sh $(pwd)/install/llvm-mingw --no-runtimes --host=aarch64-linux-gnu --with-clang --thinlto
198166 .github/workflows/store-version.sh install/llvm-mingw/versions.txt
199167 - name : Assemble the cross-built toolchain
200168 run : |
@@ -286,7 +254,7 @@ jobs:
286254
287255 # Build a cross compiler for macOS, targeting Windows.
288256 macos :
289- needs : [prepare, macos-stage1, linux-profile ]
257+ needs : [prepare, macos-stage1]
290258 runs-on : macos-14
291259 steps :
292260 - uses : actions/checkout@v4
@@ -298,9 +266,7 @@ jobs:
298266 tar -Jxf llvm-*.tar.xz
299267 rm llvm-*.tar.xz
300268 mv llvm* $HOME/llvm
301- - uses : actions/download-artifact@v4
302- with :
303- name : profile
269+ echo $HOME/llvm/bin >> $GITHUB_PATH
304270 - name : Build
305271 env :
306272 LLVM_VERSION : ${{needs.prepare.outputs.LLVM_VERSION}}
@@ -314,7 +280,8 @@ jobs:
314280 # form. Therefore, autodetection will pick them up, but linking
315281 # universal binaries fails as those libraries are unavailable in the
316282 # other (x86_64) architecture form.
317- MACOS_REDIST=1 LLVM_CMAKEFLAGS="-DLLVM_ENABLE_ZSTD=OFF -DLLDB_ENABLE_PYTHON=OFF" ./build-all.sh $HOME/llvm $(pwd)/install/llvm-mingw --thinlto --pgo
283+ export SDKROOT=$(xcrun --show-sdk-path)
284+ MACOS_REDIST=1 LLVM_CMAKEFLAGS="-DLLVM_ENABLE_ZSTD=OFF -DLLDB_ENABLE_PYTHON=OFF" ./build-all.sh $(pwd)/install/llvm-mingw --with-clang --thinlto
318285 .github/workflows/store-version.sh install/llvm-mingw/versions.txt
319286 ./test-libcxx-module.sh $(pwd)/install/llvm-mingw
320287 ./run-tests.sh $(pwd)/install/llvm-mingw
@@ -387,7 +354,7 @@ jobs:
387354 # llvm and make a proper standalone toolchain for Windows (for all 4
388355 # architectures). The binaries built here match actual releases quite closely.
389356 linux-cross-windows :
390- needs : [linux-stage1, linux-profile, prepare]
357+ needs : [linux-stage1, prepare]
391358 runs-on : ubuntu-latest
392359 strategy :
393360 fail-fast : false
@@ -408,9 +375,6 @@ jobs:
408375 sudo mv llvm-mingw* /opt/llvm-mingw
409376 echo /opt/llvm-mingw/bin >> $GITHUB_PATH
410377 - uses : actions/checkout@v4
411- - uses : actions/download-artifact@v4
412- with :
413- name : profile
414378 - name : Build
415379 env :
416380 LLVM_VERSION : ${{needs.prepare.outputs.LLVM_VERSION}}
@@ -421,7 +385,7 @@ jobs:
421385 BUILD_DATE : ${{needs.prepare.outputs.BUILD_DATE}}
422386 run : |
423387 sudo apt-get update && sudo apt-get install libltdl-dev swig autoconf-archive
424- ./build-cross-tools.sh /opt/llvm-mingw $(pwd)/install/llvm-mingw ${{matrix.arch}} --with-python --thinlto --pgo
388+ ./build-cross-tools.sh /opt/llvm-mingw $(pwd)/install/llvm-mingw ${{matrix.arch}} --with-python --thinlto
425389 .github/workflows/store-version.sh install/llvm-mingw/versions.txt
426390 cd install
427391 NAME=llvm-mingw-$TAG-${{matrix.crt}}-${{matrix.arch}}
@@ -787,7 +751,6 @@ jobs:
787751 rm -rf msys2*
788752 rm -rf linux-stage1-*
789753 rm -rf macos-llvm*
790- rm -rf profile*
791754 mv *-toolchain/*.zip *-toolchain/*.tar.xz .
792755 - name : Upload binaries
793756 env :
0 commit comments