소스 검색

Refactor LTO variable usage in build scripts

Updated the LTO variable usage in build scripts to use the value from the LTO environment variable instead of hardcoding 'thin'.
jimsterino98 2 주 전
부모
커밋
8debfd5899
1개의 변경된 파일8개의 추가작업 그리고 8개의 파일을 삭제
  1. 8 8
      .github/actions/build/action.yml

+ 8 - 8
.github/actions/build/action.yml

@@ -21,23 +21,23 @@ runs:
      echo "Building the kernel..."
      if [[ $BRANCH == SM-A055* || $BRANCH == SM-X926B* ]]; then
       chmod +x build_kernel.sh
-      LTO=thin ./build_kernel.sh || true
+      LTO="$LTO" ./build_kernel.sh || true
      elif [[ $BRANCH == SM-S926* ]]; then
        #tools/bazel run --nocheck_bzl_visibility --config=stamp --sandbox_debug --verbose_failures --debug_make_verbosity=I //projects/s5e9945:s5e9945_user_dist
-       tools/bazel build --nocheck_bzl_visibility --config=stamp --sandbox_debug --verbose_failures --debug_make_verbosity=I --lto=thin //projects/s5e9945:s5e9945_user
+       tools/bazel build --nocheck_bzl_visibility --config=stamp --sandbox_debug --verbose_failures --debug_make_verbosity=I --lto="$LTO" //projects/s5e9945:s5e9945_user
       elif [[ $BRANCH == SM-A556* ]]; then
        #tools/bazel run --nocheck_bzl_visibility --config=stamp --sandbox_debug --verbose_failures --debug_make_verbosity=I //projects/s5e8845:s5e8845_user_dist
-       tools/bazel build --nocheck_bzl_visibility --config=stamp --sandbox_debug --verbose_failures --debug_make_verbosity=I --lto=thin //projects/s5e8845:s5e8845_user
+       tools/bazel build --nocheck_bzl_visibility --config=stamp --sandbox_debug --verbose_failures --debug_make_verbosity=I --lto="$LTO" //projects/s5e8845:s5e8845_user
      elif [[ $BRANCH == SM-S938B* ]]; then
       sed -i '/drivers\/net\/usb\/smsc75xx\.ko/d;/drivers\/net\/usb\/smsc95xx\.ko/d' kernel_platform/common/modules.bzl
       chmod +x build_kernel_GKI.sh
-      LTO=thin ./build_kernel_GKI.sh || true
+      LTO="$LTO" ./build_kernel_GKI.sh || true
      elif [[ $KERNEL_VER == 6.* ]]; then
       chmod +x build_kernel_GKI.sh
-      LTO=thin ./build_kernel_GKI.sh || true
+      LTO="$LTO" ./build_kernel_GKI.sh || true
      elif [[ -d kernel_platform ]]; then
       cd kernel_platform
-      tools/bazel build --lto=thin //common:kernel_aarch64
+      tools/bazel build --lto="$LTO" //common:kernel_aarch64
      fi
       
   - name: start make build
@@ -49,12 +49,12 @@ runs:
      cd "$CONFIG"
      if [[ -f build_kernel_GKI.sh ]]; then
       chmod +x build_kernel_GKI.sh
-      LTO=thin ./build_kernel_GKI.sh || true
+      LTO="$LTO" ./build_kernel_GKI.sh || true
      elif [[ -f build_kernel.sh ]]; then
       sudo apt update
       sudo apt-get install -y libyaml-dev
       chmod +x build_kernel.sh
-      LTO=thin ./build_kernel.sh || true
+      LTO="$LTO" ./build_kernel.sh || true
      fi
      
      #if [[ $BRANCH == SM-S928B* || "$BRANCH" == "SM-S938B-Oneui7" || "$BRANCH" == "SM-S931B-Oneui8" || "$BRANCH" == "SM-F741B-Oneui8" || "$BRANCH" == "SM-X710-Oneui6.1.1" ]]; then