Skip to content

Commit 2f6ce57

Browse files
committed
build: add cmake based build infrastructure
Rather than rely on make, use CMake to generate the rules in the build system of choice. This allows building with `make` or `ninja`, and enables building the WASI libc on Windows. ``` cmake -G Ninja -B build -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_C_COMPILER=clang -DCMAKE_SYSTEM_NAME=wasi -DCMAKE_MODULE_PATH=cmake/Modules ninja -C build install ```
1 parent a280fea commit 2f6ce57

File tree

3 files changed

+1126
-1
lines changed

3 files changed

+1126
-1
lines changed

.azure-pipelines.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,5 +51,12 @@ jobs:
5151
echo "##vso[task.setvariable variable=WASM_NM;]$(rustc --print sysroot|sed 's|C:|/c|'|sed 's|\\|/|g')/lib/rustlib/x86_64-pc-windows-msvc/bin/llvm-nm.exe"
5252
displayName: Install llvm-nm (Windows)
5353
condition: and(succeeded(), eq( variables['Agent.OS'], 'Windows_NT' ))
54-
- script: make -j4
54+
- task: CMake@1
55+
inputs:
56+
workingDirectory: $(Build.BinariesDirectory)/wasi-libc
57+
cmakeArgs: cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_C_COMPILER=clang -DCMAKE_SYSTEM_NAME=wasi -DCMAKE_MODULE_PATH=$(Build.SourcesDirectory)/cmake/Modules $(Build.SourcesDirectory)
58+
displayName: Configure
59+
- task: CMake@1
60+
inputs:
61+
cmakeArgs: cmake --build $(Build.BinariesDirectory)/wasi-libc
5562
displayName: Build

0 commit comments

Comments
 (0)