Make GENERATE_BAZEL_FILES=true correct.
This is achieved by writing soong.environment.used in Main() instead of as a side effect of a singleton. This makes a difference because build actions are not generated when GENERATE_BAZEL_FILES=true is set, therefore the side effect did not happen. Arguably, Main() is made worse by this change, but I don't want to tackle the problem of readably determining which mode soong_build is running in in this change. Test: Presubmits + the additional test. Change-Id: I66af2429aedf008762173eaaa55b828b4cf4328b
This commit is contained in:
@@ -206,7 +206,6 @@ func collateGloballyRegisteredSingletons() sortableComponents {
|
||||
|
||||
// Register env and ninjadeps last so that they can track all used environment variables and
|
||||
// Ninja file dependencies stored in the config.
|
||||
singleton{false, "env", EnvSingleton},
|
||||
singleton{false, "ninjadeps", ninjaDepsSingletonFactory},
|
||||
)
|
||||
|
||||
|
Reference in New Issue
Block a user