diff --git a/.github/workflows/scripts/ti_build/compiler.py b/.github/workflows/scripts/ti_build/compiler.py index 4e97a2f27bdf2..4f1fbbf86e792 100644 --- a/.github/workflows/scripts/ti_build/compiler.py +++ b/.github/workflows/scripts/ti_build/compiler.py @@ -19,7 +19,7 @@ # -- code -- @banner("Setup Clang") -def setup_clang(as_compiler=True) -> None: +def setup_clang(as_compiler=True, use_env=True) -> None: """ Setup Clang. """ @@ -49,12 +49,12 @@ def setup_clang(as_compiler=True) -> None: if as_compiler: cc = os.environ.get("CC") cxx = os.environ.get("CXX") - if cc: + if cc and use_env: warn(f"Explicitly specified compiler via environment variable CC={cc}, not configuring clang.") else: cmake_args["CMAKE_C_COMPILER"] = clang - if cxx: + if cxx and use_env: warn(f"Explicitly specified compiler via environment variable CXX={cxx}, not configuring clang++.") else: cmake_args["CMAKE_CXX_COMPILER"] = clangpp diff --git a/.github/workflows/scripts/ti_build/entry.py b/.github/workflows/scripts/ti_build/entry.py index 66b73a920627f..c49b7fc934702 100644 --- a/.github/workflows/scripts/ti_build/entry.py +++ b/.github/workflows/scripts/ti_build/entry.py @@ -78,7 +78,7 @@ def setup_basic_build_env(): setup_msvc() else: # Use Clang on all other platforms - setup_clang() + setup_clang(as_compiler=True, use_env=False) setup_llvm() setup_vulkan()