Don't write to $buildDir/.bootstrap in the ninja file generated for
the main stage.
Test: examine main stage build.ninja file
Change-Id: I9c6183c9a434ff11d44cdd4f9844eae192ebfe03
* aosp/upstream:
Add proptools.FilterPropertyStruct
Make CreateModule return the newly created module
Add proptools.Int and proptools.IntDefault
Test: m checkbuild
Change-Id: I4bbd45be12794c1a8575799950772d4ecd272628
Move some code from Soong to support creating a property struct
at runtime by filtering fields out of another property struct.
Test: TestFilterPropertyStruct
Change-Id: Ic5ae390a885195bebad6f3ecb7c752c0582a60b1
Add proptools.Int and proptools.IntDefault that behave analogously
to proptools.String and proptools.StringDefault.
Change-Id: I41fd3417c973c9ff4a5aa6680546b4b893784745
* aosp/upstream:
Don't ignore local variations when creating reverse dep
Added VisitDirectDeps* methods to SingletonContext.
Test: m
Change-Id: I4832a523588c3095b077b89d2ecb4068b490fed4
This fixes a bug that reverse dependency can't be made for modules
having local variations. Previously, when module A having local variants
calls AddReverseDependency to module B having local variants, the match
is tested between the non-local variants of module A against all
variants of module B, which can never be successful.
This change fixes it by using all variants of module A when
findMatchingVariants is called for AddReverseDependency.
Test: m
Change-Id: Ib289188a5dd58c72bd6ba07e3c0f825f8b1c6b1b
A an example use case is generating the graph of module
dependencies, where modules are vertices and dependencies
are edges.
The patch was tested with a local implementation of such
a module in the Soong build system. The graph was generated
for all modules in the AOSP tree.
am: d52d9b65d7 -s ours
am skip reason: change_id I76dd2fa706c67da7973cbc500142f7f5c597a3cb with SHA1 47653a7b0b is in history
Change-Id: I5e0edbac4dfde919fe10dd26f0ebd0ea7ef8bfe9
am: ba1c448eaa -s ours
am skip reason: change_id I76dd2fa706c67da7973cbc500142f7f5c597a3cb with SHA1 47653a7b0b is in history
Change-Id: I68802948814099b8c9bc1b5b7b0d434ddc92cfda
am: eb03bacf3f -s ours
am skip reason: change_id I76dd2fa706c67da7973cbc500142f7f5c597a3cb with SHA1 47653a7b0b is in history
Change-Id: Ib7bcca8bcee122112b3a36795ad1246bd58a333c
The go compile command in go 1.13 needs -p main instead of
-p $pkgPath when compiling binaries. This also works for older
go releases.
Also turn on travis for go 1.13.
Change-Id: I45ce185aa44cfa01a7933cc6e52290a85c851641
* aosp/upstream:
Fix checkCalledFromInit
Test: treehugger
Test: cd build/soong/apex; go test ./... (with go 1.13rc1)
Change-Id: Ibaaee1656c6139cc015b86b1f78c849d00d964fc
This function checks if it is called from init() by looking into
callers. By the way, it may fail when init() is inlined.
To fix this, CallersFrames() is used to translate PCs into symbolic
information accounting for inlined functions.
Test: go test ./...
Change-Id: I18b3c3ffdaf71f775e3522c87607aec5df7b09c5
am: 2158103ede -s ours
am skip reason: change_id I2c79c3c9e0437fd785b06ca20f43da2963d50b68 with SHA1 1a01946bf1 is in history
Change-Id: I76923eb2501085410386a358f123ea5a11010f18
am: ba1ea75839 -s ours
am skip reason: change_id I2c79c3c9e0437fd785b06ca20f43da2963d50b68 with SHA1 1a01946bf1 is in history
Change-Id: I3c2ea2309b23ecff2dde2ac811abcc5510c33f77
SetDefaultDependencyVariation sets the variation name that will be used
when a dangling dependency is found while a module is being split. A
dangling dependency can occur if a module is split to a variant that one
of its dependencies is not split into. When the default variation is not
set, such dangling dependency is a hard error. But with the new
function, the default variation can be set and subsequent calls to
CreateVariations and its variations on the same context uses the default
variation when necessary.
(If even the default variation does not exist for the dependent module,
it is an hard error)
Note that this is different from calling SetDependencyVariation("foo")
followed by CreateVariations("foo", "bar"). In that case, regardless of
whether a dependency of the current module has the variant 'bar' or not,
only the 'foo' variant is chosen.
With SetDefaultDependencyVariation("foo") followed by
CreateVariations("foo", "bar"), 'foo' variant is used only when the
'bar' variant of the current module depends on a module that does not
have 'bar' variant.
Bug: 138103882
Test: m
Merged-In: I2c79c3c9e0437fd785b06ca20f43da2963d50b68
(cherry picked from commit 1e2e56dc62)
Change-Id: I4520ca87487994de024fdbacda3bef6636225f0d