From b13e0214d651ff07ec894c6358062afc4d5c15a6 Mon Sep 17 00:00:00 2001 From: topjohnwu Date: Tue, 6 Aug 2024 10:29:43 -0700 Subject: [PATCH] Fix shell scripts --- build-windows.sh | 3 +-- build.sh | 3 +-- common.sh | 7 ++++++- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/build-windows.sh b/build-windows.sh index 830199c..5cc599c 100755 --- a/build-windows.sh +++ b/build-windows.sh @@ -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 diff --git a/build.sh b/build.sh index e47257b..09d6b51 100755 --- a/build.sh +++ b/build.sh @@ -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 diff --git a/common.sh b/common.sh index 56e4f5f..0fdc0bb 100644 --- a/common.sh +++ b/common.sh @@ -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