File tree Expand file tree Collapse file tree 3 files changed +9
-7
lines changed Expand file tree Collapse file tree 3 files changed +9
-7
lines changed Original file line number Diff line number Diff line change @@ -31,12 +31,12 @@ RUN pip3 install requests
3131
3232RUN mkdir -p /cxx-common
3333WORKDIR /cxx-common
34- COPY . ./
3534
36- # Try to recover cache
35+ # Will try to use cache at './cache'
3736# Get cache using
38- # docker run --rm --entrypoint /bin/bash -v $(pwd)/cache:/tmp cxx-bootstrap -c "cp -r /cache/* /tmp"
39- RUN mv ./cache /cache || true
37+ # docker build -t cxx-common-build --target cxx-common-build .
38+ # docker run --rm --entrypoint /bin/bash -v $(pwd)/cache:/tmp cxx-common-build -c "cp -r ./cache /tmp"
39+ COPY . ./
4040
4141RUN mkdir -p "${BOOTSTRAP}" && mkdir -p "${LIBRARIES}"
4242
Original file line number Diff line number Diff line change @@ -628,12 +628,13 @@ def common_installer_llvm(properties):
628628 cmake_command += ["-DLLVM_ENABLE_Z3_SOLVER=OFF" , "-DCLANG_ANALYZER_ENABLE_Z3_SOLVER=OFF" ]
629629
630630 if properties ["ccache" ]:
631- print (" i Enabling ccache on /cache/ccache ... " )
631+ ccache_dir = f"{ os .getcwd ()} /cache/ccache"
632+ print (f" i Enabling ccache on { ccache_dir } ... " )
632633 # some versions of LLVM use CCACHE_MAX_SIZE, others use CCACHE_SIZE
633634 cmake_command .extend (
634635 ["-DLLVM_CCACHE_BUILD=ON" ,
635636 "-DLLVM_CCACHE_SIZE=5G" ,
636- " -DLLVM_CCACHE_DIR=/cache/ccache" ,
637+ f' -DLLVM_CCACHE_DIR=" { ccache_dir } "' ,
637638 "-DLLVM_CCACHE_MAXSIZE=5G" ])
638639
639640 if use_libcxx :
Original file line number Diff line number Diff line change @@ -49,7 +49,8 @@ def set_ccache_compiler():
4949 """
5050 os .environ ["CMAKE_CXX_COMPILER_LAUNCHER" ] = "ccache"
5151 os .environ ["CMAKE_C_COMPILER_LAUNCHER" ] = "ccache"
52- os .environ ["CCACHE_DIR" ] = "/cache/ccache"
52+ # Only works if we never change directories in the script(s)
53+ os .environ ["CCACHE_DIR" ] = f'"{ os .getcwd ()} /cache/ccache"'
5354
5455
5556def get_parallel_build_options ():
You can’t perform that action at this time.
0 commit comments