Skip to content

Commit

Permalink
Fix shell scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
topjohnwu committed Aug 6, 2024
1 parent b7c45e1 commit b13e021
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
3 changes: 1 addition & 2 deletions build-windows.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,7 @@ build() {
set_rust_cfg dist.include-mingw-linker true

cd rust
python ./x.py --config '../config.toml' --build $TRIPLE \
$RUST_CFG "--set=llvm.build-config={ $LLVM_BUILD_CFG }" install
eval python ./x.py --config ../config.toml --build $TRIPLE $(print_rust_cfg) install
cd ../

cd out
Expand Down
3 changes: 1 addition & 2 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,7 @@ build() {
set_rust_cfg rust.lto thin

cd rust
python3 ./x.py --config "../config.toml" --host $TRIPLE \
$RUST_CFG "--set=llvm.build-config={ $LLVM_BUILD_CFG }" install
eval python3 ./x.py --config ../config.toml --host $TRIPLE $(print_rust_cfg) install
cd ../

cd out
Expand Down
7 changes: 6 additions & 1 deletion common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,12 @@ set_llvm_build_cfg() {

# key value
set_rust_cfg() {
RUST_CFG="$RUST_CFG --set=$1=$2"
RUST_CFG="$RUST_CFG '--set=$1=$2'"
}

print_rust_cfg() {
set_rust_cfg llvm.build-config "{ $LLVM_BUILD_CFG }"
echo $RUST_CFG
}

# url sha
Expand Down

0 comments on commit b13e021

Please # to comment.