File tree Expand file tree Collapse file tree 1 file changed +12
-12
lines changed
Expand file tree Collapse file tree 1 file changed +12
-12
lines changed Original file line number Diff line number Diff line change @@ -89,20 +89,20 @@ jobs:
8989 echo "Found cl.exe at: ${CL_EXE}"
9090 echo "CL_EXE=${CL_EXE}" >> $GITHUB_ENV
9191
92- - name : Generate sccache wrapper script
92+ - name : Write and compile cl shim (creates cl.exe that calls sccache)
9393 if : ${{ startsWith(inputs.host-platform, 'win') }}
9494 run : |
95- # Create a wrapper directory
96- mkdir -p sccache_wrapper
97- # Generate the wrapper script named cl.exe
98- CL_EXE=$(cygpath -w "${CL_EXE}")
99- cat > sccache_wrapper/cl.exe <<'EOF'
100- @echo off
101- ${{ env.SCCACHE_PATH }} ${CL_EXE} %*
102- EOF
103- cat sccache_wrapper/cl.exe
104- # Record the wrapper path for later use
105- echo "SCCACHE_WRAPPER_DIR=$(realpath "./sccache_wrapper" )" >> $GITHUB_ENV
95+ cl "/nologo" "/O2" ci/tools/cl_shim.c "/Fe:cl.exe"
96+ RC=$?
97+ if [ $RC -ne 0 ]; then
98+ echo "cl failed with exit code $RC" >&2
99+ exit $RC
100+ fi
101+ if [ ! -f ./cl.exe ]; then
102+ echo "Failed to build cl_shim.c: output not found" >&2
103+ exit 1
104+ fi
105+ echo "SCCACHE_WRAPPER_DIR=$(realpath . )" >> $GITHUB_ENV
106106
107107 - name : Set environment variables
108108 env :
You can’t perform that action at this time.
0 commit comments