From 5039ef4d289ade8fee3fcf9f99c6c02c5cc0ecbc Mon Sep 17 00:00:00 2001 From: Dan Willemsen Date: Fri, 18 May 2018 11:00:17 -0700 Subject: Add documentation around PATH restrictions Test: view markdown through gitiles Change-Id: If9ef146d8993d0dbfde85660d5c87b05c1c11888 --- Changes.md | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) (limited to 'Changes.md') diff --git a/Changes.md b/Changes.md index 37bbad09f4..7519096c76 100644 --- a/Changes.md +++ b/Changes.md @@ -1,5 +1,32 @@ # Build System Changes for Android.mk Writers +## PATH Tools {#PATH_Tools} + +The build has started restricting the external host tools usable inside the +build. This will help ensure that build results are reproducible across +different machines, and catch mistakes before they become larger issues. + +To start with, this includes replacing the $PATH with our own directory of +tools, mirroring that of the host PATH. The only difference so far is the +removal of the host GCC tools. Anything that is not explicitly in the +configuration as allowed will continue functioning, but will generate a log +message. This is expected to become more restrictive over time. + +The configuration is located in build/soong/ui/build/paths/config.go, and +contains all the common tools in use in many builds. Anything not in that list +will currently print a warning in the `$OUT_DIR/soong.log` file, including the +command and arguments used, and the process tree in order to help locate the +usage. + +In order to fix any issues brought up by these checks, the best way to fix them +is to use tools checked into the tree -- either as prebuilts, or building them +as host tools during the build. + +As a temporary measure, you can set `TEMPORARY_DISABLE_PATH_RESTRICTIONS=true` +in your environment to temporarily turn off the error checks and allow any tool +to be used (with logging). Beware that GCC didn't work well with the interposer +used for logging, so this may not help in all cases. + ## Deprecating / obsoleting envsetup.sh variables in Makefiles It is not required to source envsetup.sh before running a build. Many scripts, -- cgit v1.2.3