Loading Changes.md +19 −1 Original line number Diff line number Diff line # Build System Changes for Android.mk Writers ## Rules executed within limited environment With `ALLOW_NINJA_ENV=false` (soon to be the default), ninja, and all the rules/actions executed within it will only have access to a limited number of environment variables. Ninja does not track when environment variables change in order to trigger rebuilds, so changing behavior based on arbitrary variables is not safe with incremental builds. Kati and Soong can safely use environment variables, so the expectation is that you'd embed any environment variables that you need to use within the command line generated by those tools. See the [export section](#export_keyword) below for examples. For a temporary workaround, you can set `ALLOW_NINJA_ENV=true` in your environment to restore the previous behavior, or set `BUILD_BROKEN_NINJA_USES_ENV_VAR := <var> <var2> ...` in your `BoardConfig.mk` to allow specific variables to be passed through until you've fixed the rules. ## LOCAL_C_INCLUDES outside the source/output trees are an error {#BUILD_BROKEN_OUTSIDE_INCLUDE_DIRS} Include directories are expected to be within the source tree (or in the output Loading Loading @@ -31,7 +49,7 @@ Since this usually isn't a valid path, you can almost always just remove the offending line. # `BOARD_HAL_STATIC_LIBRARIES` and `LOCAL_HAL_STATIC_LIBRARIES` are obsolete {#BOARD_HAL_STATIC_LIBRARIES} ## `BOARD_HAL_STATIC_LIBRARIES` and `LOCAL_HAL_STATIC_LIBRARIES` are obsolete {#BOARD_HAL_STATIC_LIBRARIES} Define proper HIDL / Stable AIDL HAL instead. Loading core/board_config.mk +3 −1 Original line number Diff line number Diff line Loading @@ -98,7 +98,8 @@ _build_broken_var_list += \ BUILD_BROKEN_USES_$(m)) _board_true_false_vars := $(_build_broken_var_list) _board_strip_readonly_list += $(_build_broken_var_list) _board_strip_readonly_list += $(_build_broken_var_list) \ BUILD_BROKEN_NINJA_USES_ENV_VARS # Conditional to building on linux, as dex2oat currently does not work on darwin. ifeq ($(HOST_OS),linux) Loading @@ -109,6 +110,7 @@ endif # Broken build defaults # ############################################################### $(foreach v,$(_build_broken_var_list),$(eval $(v) :=)) BUILD_BROKEN_NINJA_USES_ENV_VARS := # Boards may be defined under $(SRC_TARGET_DIR)/board/$(TARGET_DEVICE) # or under vendor/*/$(TARGET_DEVICE). Search in both places, but Loading Loading
Changes.md +19 −1 Original line number Diff line number Diff line # Build System Changes for Android.mk Writers ## Rules executed within limited environment With `ALLOW_NINJA_ENV=false` (soon to be the default), ninja, and all the rules/actions executed within it will only have access to a limited number of environment variables. Ninja does not track when environment variables change in order to trigger rebuilds, so changing behavior based on arbitrary variables is not safe with incremental builds. Kati and Soong can safely use environment variables, so the expectation is that you'd embed any environment variables that you need to use within the command line generated by those tools. See the [export section](#export_keyword) below for examples. For a temporary workaround, you can set `ALLOW_NINJA_ENV=true` in your environment to restore the previous behavior, or set `BUILD_BROKEN_NINJA_USES_ENV_VAR := <var> <var2> ...` in your `BoardConfig.mk` to allow specific variables to be passed through until you've fixed the rules. ## LOCAL_C_INCLUDES outside the source/output trees are an error {#BUILD_BROKEN_OUTSIDE_INCLUDE_DIRS} Include directories are expected to be within the source tree (or in the output Loading Loading @@ -31,7 +49,7 @@ Since this usually isn't a valid path, you can almost always just remove the offending line. # `BOARD_HAL_STATIC_LIBRARIES` and `LOCAL_HAL_STATIC_LIBRARIES` are obsolete {#BOARD_HAL_STATIC_LIBRARIES} ## `BOARD_HAL_STATIC_LIBRARIES` and `LOCAL_HAL_STATIC_LIBRARIES` are obsolete {#BOARD_HAL_STATIC_LIBRARIES} Define proper HIDL / Stable AIDL HAL instead. Loading
core/board_config.mk +3 −1 Original line number Diff line number Diff line Loading @@ -98,7 +98,8 @@ _build_broken_var_list += \ BUILD_BROKEN_USES_$(m)) _board_true_false_vars := $(_build_broken_var_list) _board_strip_readonly_list += $(_build_broken_var_list) _board_strip_readonly_list += $(_build_broken_var_list) \ BUILD_BROKEN_NINJA_USES_ENV_VARS # Conditional to building on linux, as dex2oat currently does not work on darwin. ifeq ($(HOST_OS),linux) Loading @@ -109,6 +110,7 @@ endif # Broken build defaults # ############################################################### $(foreach v,$(_build_broken_var_list),$(eval $(v) :=)) BUILD_BROKEN_NINJA_USES_ENV_VARS := # Boards may be defined under $(SRC_TARGET_DIR)/board/$(TARGET_DEVICE) # or under vendor/*/$(TARGET_DEVICE). Search in both places, but Loading