Skip to content

Commit 2ed3e02

Browse files
authored
Use just built CMake for Static SDK (#401)
* [Static Linux SDK] Build CMake first and avoid using host CMake * Fix the path for CMake source dir
1 parent 15f663a commit 2ed3e02

File tree

1 file changed

+10
-0
lines changed
  • swift-ci/sdks/static-linux/scripts

1 file changed

+10
-0
lines changed

swift-ci/sdks/static-linux/scripts/build.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -229,6 +229,15 @@ function run() {
229229
"$@"
230230
}
231231

232+
header "Building CMake from source"
233+
234+
quiet_pushd ${source_dir}/swift-project/cmake
235+
run ./bootstrap --no-qt-gui -- -DCMAKE_USE_OPENSSL=OFF
236+
run make -j$parallel_jobs
237+
run export PATH=${source_dir}/swift-project/cmake/bin:$PATH
238+
quiet_popd
239+
run cmake --version
240+
232241
header "Patching Musl"
233242

234243
echo -n "Patching Musl for locale support... "
@@ -642,6 +651,7 @@ EOF
642651
--musl-path=${build_dir}/sdk_root \
643652
--linux-static-arch=$arch \
644653
--install-destdir=$sdk_root \
654+
--cmake=${source_dir}/swift-project/cmake/bin/cmake \
645655
--install-prefix=/usr \
646656
--swift-install-components="libexec;stdlib;sdk-overlay" \
647657
--extra-cmake-options="-DSWIFT_SHOULD_BUILD_EMBEDDED_STDLIB=NO -DLLVM_USE_LINKER=lld -DLLVM_NO_DEAD_STRIP=On" \

0 commit comments

Comments
 (0)