Last active
September 10, 2020 02:33
-
-
Save dougpuob/6fb97d5615305f6fbe0c4e437cec5845 to your computer and use it in GitHub Desktop.
llvm-project.git--build-*.ps1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
**我用來 build llvm-project.git 的 PowerShell script files** | |
build-windows-msvc2019-relwithdebinfo.ps1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (-Not (Test-Path 'llvm-project.git/build-debug')) { | |
New-Item -Path 'llvm-project.git/build-debug' -ItemType Directory | |
} | |
Push-Location 'llvm-project.git/build-debug' | |
cmake -DLLVM_ENABLE_ABI_BREAKING_CHECKS=0 ` | |
-DLLVM_BUILD_TOOLS=ON ` | |
-DLLVM_BUILD_EXAMPLES=ON ` | |
-DLLVM_INCLUDE_TESTS=ON ` | |
-DLLVM_USE_LINKER="lld" ` | |
-DLLVM_TARGETS_TO_BUILD="X86" ` | |
-DLLVM_BUILD_DOCS=OFF ` | |
-DLLVM_ENABLE_DOXYGEN=OFF ` | |
-DLLVM_ENABLE_PROJECTS="clang;clang-tools-extra;debuginfo-tests" ` | |
-DCMAKE_C_FLAGS='-O0' ` | |
-DCMAKE_CXX_FLAGS='-O0' ` | |
-DCMAKE_C_COMPILER="gcc" ` | |
-DCMAKE_CXX_COMPILER="g++" ` | |
-DCMAKE_BUILD_TYPE=Debug ` | |
-DCMAKE_CXX_STANDARD=17 ` | |
-DCMAKE_VERBOSE_MAKEFILE=OFF ` | |
-G "Ninja" ` | |
../llvm ` | |
| tee ../build-cmake-linux-clang-config.log | |
cmake --build . --config Debug | tee ../build-cmake-linux-clang-make.log | |
Pop-Location |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (-Not (Test-Path 'build-debug')) { | |
New-Item -Path 'build-debug' -ItemType Directory | |
} | |
Push-Location build-debug | |
cmake -DLLVM_ENABLE_ABI_BREAKING_CHECKS=0 ` | |
-DLLVM_BUILD_TOOLS=ON ` | |
-DLLVM_BUILD_EXAMPLES=ON ` | |
-DLLVM_INCLUDE_TESTS=ON ` | |
-DLLVM_TARGETS_TO_BUILD="X86" ` | |
-DLLVM_ENABLE_PROJECTS="clang;clang-tools-extra" ` | |
-DCMAKE_BUILD_TYPE=Debug ` | |
-G "Visual Studio 16 2019" ` | |
..\llvm ` | |
| tee ..\build-cmake-msvc2019-config.log | |
cmake --build . --config Debug | tee ..\build-cmake-msvc2019-make.log | |
Pop-Location |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (-Not (Test-Path 'build-release')) { | |
New-Item -Path 'build-release' -ItemType Directory | |
} | |
Push-Location build-release | |
cmake -DLLVM_ENABLE_ABI_BREAKING_CHECKS=0 ` | |
-DLLVM_BUILD_TOOLS=ON ` | |
-DLLVM_BUILD_EXAMPLES=ON ` | |
-DLLVM_INCLUDE_TESTS=ON ` | |
-DLLVM_TARGETS_TO_BUILD="X86" ` | |
-DLLVM_ENABLE_PROJECTS="clang;clang-tools-extra" ` | |
-DCMAKE_BUILD_TYPE=Release ` | |
-G "Ninja" ` | |
..\llvm ` | |
| tee ..\build-cmake-linux-clang-config.log | |
cmake --build . --config Release | tee ..\build-cmake-linux-clang-make.log | |
Pop-Location |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (-Not (Test-Path 'llvm-project.git/build-relwithdebinfo')) { | |
New-Item -Path 'llvm-project.git/build-relwithdebinfo' -ItemType Directory | |
} | |
Push-Location 'llvm-project.git/build-relwithdebinfo' | |
cmake -DLLVM_ENABLE_ABI_BREAKING_CHECKS=0 ` | |
-DLLVM_BUILD_TOOLS=ON ` | |
-DLLVM_BUILD_EXAMPLES=ON ` | |
-DLLVM_INCLUDE_TESTS=ON ` | |
-DLLVM_TARGETS_TO_BUILD="X86" ` | |
-DLLVM_ENABLE_PROJECTS="clang;clang-tools-extra" ` | |
-DCMAKE_BUILD_TYPE=RelWithDebInfo ` | |
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON ` | |
-G "Visual Studio 16 2019" ` | |
..\llvm ` | |
| tee ..\build-cmake-msvc2019-config-relwithdebinfo.log | |
#cmake --build . --config RelWithDebInfo | tee ..\build-cmake-msvc2019-make-relwithdebinfo.log | |
Pop-Location |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment