Skip to content

Commit a3efd2b

Browse files
committed
Update llvm install [skip ci]
1 parent 9c2b980 commit a3efd2b

File tree

4 files changed

+14
-4
lines changed

4 files changed

+14
-4
lines changed

1k/1kiss.ps1

+2-1
Original file line numberDiff line numberDiff line change
@@ -2026,12 +2026,12 @@ if (!$setupOnly) {
20262026
if (($cmake_generator -eq 'Xcode') -and !$BUILD_ALL_OPTIONS.Contains('--verbose')) {
20272027
$forward_options += '--', '-quiet'
20282028
}
2029-
$1k.println("cmake --build $BUILD_DIR $BUILD_ALL_OPTIONS")
20302029

20312030
if ($options.t) { $cmake_target = $options.t }
20322031
if ($cmake_target) {
20332032
$cmake_targets = $cmake_target.Split(',') | Sort-Object | Get-Unique
20342033
foreach ($target in $cmake_targets) {
2034+
$1k.println("cmake --build $BUILD_DIR $BUILD_ALL_OPTIONS --target $target")
20352035
cmake --build $BUILD_DIR $BUILD_ALL_OPTIONS --target $target $forward_options | Out-Host
20362036
if (!$?) {
20372037
Set-Location $stored_cwd
@@ -2040,6 +2040,7 @@ if (!$setupOnly) {
20402040
}
20412041
}
20422042
else {
2043+
$1k.println("cmake --build $BUILD_DIR $BUILD_ALL_OPTIONS")
20432044
cmake --build $BUILD_DIR $BUILD_ALL_OPTIONS $forward_options | Out-Host
20442045
if (!$?) {
20452046
Set-Location $stored_cwd

build.ps1

+7
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,10 @@ Foreach ($lib_name in $libs) {
226226
}
227227
}
228228

229+
if ($build_conf.repo.EndsWith('.git') -and $rebuild) {
230+
git -C $lib_src clean -dfx -e _1kiss
231+
}
232+
229233
$install_script = Join-Path $_1k_root "src/$lib_name/install1.ps1"
230234
$has_custom_install = (Test-Path $install_script)
231235

@@ -272,6 +276,9 @@ Foreach ($lib_name in $libs) {
272276
. $custom_build_script $target_os $target_cpu $install_dir @forward_args
273277
}
274278
Pop-Location
279+
if ($LASTEXITCODE) {
280+
throw "Build $lib_name failed"
281+
}
275282

276283
# custom install step
277284
if ($has_custom_install) {

src/llvm/clean1.ps1

-1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,5 @@ if ((Test-Path $install_dir -PathType Container)) {
55
sremove (Join-Path $install_dir 'include')
66
sremove (Join-Path $install_dir 'lib/*.lib')
77
sremove (Join-Path $install_dir 'lib/*.a')
8-
sremove (Join-Path $install_dir 'bin/*.exe')
98
ls -R "$install_dir"
109
}

src/llvm/install1.ps1

+5-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
$install_dir = $args[0]
22
# $libsrc_dir = $args[1]
33

4-
$artifact_path = @('Release\bin\libclang.dll', 'lib\libclang.so', 'Release\lib\libclang.dylib')[$HOST_OS]
4+
$artifact_files = @(@('Release\bin\libclang.dll', 'Release\bin\clang-format.exe'), 'lib\libclang.so', 'Release\lib\libclang.dylib')[0]
55
$install_dest = (Join-Path $install_dir (@('lib', 'bin')[$IsWin]))
66
mkdirs $install_dest
7-
Copy-Item (Join-Path $BUILD_DIR "$artifact_path") $install_dest
7+
8+
foreach($path in $artifact_files) {
9+
Copy-Item (Join-Path $BUILD_DIR "$path") $install_dest
10+
}

0 commit comments

Comments
 (0)