When building a release build it is very important that no environment and no paths from the development PC will leak into the binary.
But I found that there are many local paths are embedded into all executables that use CUDA.
I tried to apply regular Gnu strip to them, but some file paths still remain:
/home/my_user_name/.cache/bazel/_bazel_my_user_name/ed6380f6c54c8afeb6e734a890173a0a/execroot/main/vision/image-core/cuda
/home/my_user_name/.cache/bazel/_bazel_my_user_name/ed6380f6c54c8afeb6e734a890173a0a/execroot/main/external/cuda_tx1/aarch64-linux/include
/home/my_user_name/.cache/bazel/_bazel_my_user_name/ed6380f6c54c8afeb6e734a890173a0a/execroot/main/external/cuda_tx1/aarch64-linux/include/thrust/system/cuda/detail/cub/device/dispatch/…/…
/home/my_user_name/.cache/bazel/_bazel_my_user_name/ed6380f6c54c8afeb6e734a890173a0a/execroot/main/external/cuda_tx1/aarch64-linux/include/thrust/detail
/home/my_user_name/.cache/bazel/_bazel_my_user_name/ed6380f6c54c8afeb6e734a890173a0a/execroot/main/external/cuda_tx1/aarch64-linux/include/thrust/detail/functional
/home/my_user_name/.cache/bazel/_bazel_my_user_name/ed6380f6c54c8afeb6e734a890173a0a/execroot/main/external/cuda_tx1/aarch64-linux/include/thrust/system/detail/sequential
/home/my_user_name/.cache/bazel/_bazel_my_user_name/ed6380f6c54c8afeb6e734a890173a0a/execroot/main/external/cuda_tx1/aarch64-linux/include/thrust/system/cuda/detail
/home/my_user_name/.cache/bazel/_bazel_my_user_name/ed6380f6c54c8afeb6e734a890173a0a/execroot/main/external/cuda_tx1/aarch64-linux/include/thrust/system/cuda/detail/bulk
I figured out that these came from nvcc:
nvcc core.host.o core.device.o core.cu # I omitted some paths here for clarity
in turn these paths seem to come from /tmp/xxx_core.device.cubin generated by /usr/local/cuda-9.0/bin/nvlink.
I cannot find any parameters to disable this paths embedding.
Please, tell me how to prevent paths leakage.
Thank you