Skip to content

Commit fd4b4ea

Browse files
committed
allow devs to turn-off read-only mode
Signed-off-by: onur-ozkan <[email protected]>
1 parent abae168 commit fd4b4ea

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/ci/docker/run.sh

+5-1
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,10 @@ else
199199
args="$args --env SCCACHE_DIR=/sccache --volume $HOME/.cache/sccache:/sccache"
200200
fi
201201

202+
if [ "$READ_ONLY_SRC" != "0" ]; then
203+
SRC_MOUNT_OPTION=":ro"
204+
fi
205+
202206
# Run containers as privileged as it should give them access to some more
203207
# syscalls such as ptrace and whatnot. In the upgrade to LLVM 5.0 it was
204208
# discovered that the leak sanitizer apparently needs these syscalls nowadays so
@@ -233,7 +237,7 @@ if [ -f /.dockerenv ]; then
233237
docker cp . checkout:/checkout
234238
args="$args --volumes-from checkout"
235239
else
236-
args="$args --volume $root_dir:/checkout:ro"
240+
args="$args --volume $root_dir:/checkout$SRC_MOUNT_OPTION"
237241
args="$args --volume $objdir:/checkout/obj"
238242
args="$args --volume $HOME/.cargo:/cargo"
239243
args="$args --volume $HOME/rustsrc:$HOME/rustsrc"

0 commit comments

Comments
 (0)