Skip to content

Add option to prefix relative paths + working directory with a build directory

Jeremiah Bonney requested to merge jbonney/recc:jbonney/prefix-build-dir into master

This MR adds the RECC_BUILD_PREFIX_DIR option, which when set prefixes all relative input paths + workingDirectory with a specified directory name. The motivation behind this is simple, to keep from having actions run in the root of the input root. This causes problems with setups using buildbox-run-userchroot + buildbox-casd, which currently requires the root of the input root having stricter permissions than other directories. By putting all relative path files/directories into a directory that's part of the input root, and having the working directory also under that directory, we bypass this issues in many cases.

Without this change, the following action fails when using buildgrid + buildbox-run-userchroot + buildbox-casd due to writing a file under / directly where it won't have permissions.

recc gcc -c foo.cpp -o foo.o

With this change, the action works as expected.

Merge request reports