Bug: http://b/65598278
This property defaults to 'true' and setting it to false skips profile
use. This escape hatch lets us disable PGO for a module without
completely removing the 'pgo' property. Additionally, this also helps
selectively disabling PGO for some architectures, if desired.
Test: Test that -fprofile-use is not added for a test module if
'enable_profile_use: false' is set.
Change-Id: Ifcf1a48c194bc86efd88a529cc2d66a47b7ab080
Bug: http://b/65598278
Non-PGO builds (with this environment variable set) can be used to
measure the performance difference induced by PGO.
Test: Build PGO modules with ANDROID_PGO_PROFILE_USE set.
Change-Id: Ib23bad5208ac7f54894c7768d7532f53b6b91179
These methods only need the 'PgoProperties' struct. Avoid the extra
indirection by directly using this struct.
Test: Build modules with PGO property.
Change-Id: I1923ebde4b0d546810de8e696514d218b3a4f54b
The crash we're following is likely a stack overflow. Use an alternate
stack to actually get the backtraces.
Also write out ulimit to reference what the stack size should be.
Bug: 36182021
Test: ulimit -s 768; build/soong/build_test.bash
Change-Id: I8826e5e53f38af552c8b80a1a8a490fde55f2d4b
Generated source files were being included twice, once manually
and once by ctx.ExpandSources. Remove the manual one.
Bug: 67364649
Test: TestGeneratedSources in later patch
Change-Id: Ia6760b01a34a96767a914bdcb911a39fa6683300
Putting a genrule dependency after a glob in a srcs property
was causing the generated files to be treated as globbed files
and hitting an interface conversion panic.
Bug: 67364649
Test: TestGeneratedSources in later patch
Change-Id: I8a076c9998fdd07e53769922be433a793ca575a9
This can make it easier to add build/soong/build_test.sh to continuous
build branches to catch new breaks, but where some products are known to
be broken.
Test: build/soong/build_test.bash --skip-products aosp_arm,aosp_arm64
Change-Id: Ib240570b68957077047ca75b78658429cb8c6a49
Bug: http://b/65598278
The profile runtime depends on libgcc for some symbols (only under some
circumstances - armv5, ndk r14, static executables). Since Android
build passes -nostdlib and adds libgcc manually, the profile runtime
gets passed to the linker later than libgcc.
Instead, explicitly add the profile runtime to the linker command (and
pass one other flag added by the clang driver to the link).
Test: Build a library with profile instrumentation that otherwise fails
instrumented build.
Change-Id: I24b34cebd2c3bb6a540f8f4c465ace1be4eb90f3
Signed-off-by: Pirama Arumuga Nainar <pirama@google.com>
java_resource_dirs was using a file list file that was generated
at ninja time to get the list of files to include, which meant
there were no dependencies on the files to cause res.jar to get
rebuilt. Switch to using a glob at soong time instead. This
is substantially similar to a glob in java_resources, except that
java_resource_dirs strips the listed directories off the paths
that end up in the jar.
Test: TestResources in java_test.go
Change-Id: I4b9b38f7b6b38a013cbb4e211187e7282a6795c0
Honor the default resource exclusions in java_resources properties
including *.java.
Test: m -j checkbuild
Change-Id: Ia117a000680161b54c189758926ddb2068a2a2c3
Dex jars were getting their resources from the res.jar files of
their transitive static dependencies. This accidentally bypassed
jarjar on resources, since the jarjar pass only happened once the
resources jar was combined into the classpath jar. Switch to
getting the resources out of the classpath jar by merging it
with the dex jar while skipping *.class.
Test: m -j checkbuild
Test: compare ext.jar to one generated by make
Change-Id: I5f6f3da738dcb0af56ab9a1bd7174ed5359de2b2
Putting resources in dex jars is going to need to pull files from
classpath jars that do not match *.class.
Test: m -j checkbuild
Change-Id: Ia37b8b9387e5f5636769afc6937b9aa3c9ec1ced
This reverts commit 2370af0e23.
Reason for revert: New Build Breakage: aosp-master/aosp_arm64_ab-userdebug @ 4376965
Change-Id: Ibe4b819c4292457c454bf42e6d94fba3071ec04b
Libraries with no source files but static lib dependencies should
still be installable.
Test: m -j checkbuild
Change-Id: Ibc91aa3153241092ce86888dbf90e99b66069ff2
The partial hostdex support was causing the host variant of
java_library modules to depend on core-oj and core-libart,
which caused the tagsoup jar to use the wrong
java.lang.System.arraycopy signature. Remove the hostdex
code that was causing the problem, and add a test.
Test: java_test.go
Change-Id: I4f7b1f29c99aae328ba19b042538d9d35544aa43
Bug: http://b/63768402
Wno-backend-plugin warnings are generated by IR-based PGO when sources
evolve and the profiles become stale. Disable these warnings when
profiles are passed to the compiler.
Test: Build a module with a PGO property when profiles are used.
Change-Id: I462bbf55aafd8770a90c2c23462bf71607ac9108
Once this is submitted and we don't have any more references to
target.linux, it can be added back as a common target for all
linux-kernel based targets.
Test: m nothing
Change-Id: Iae5e82eaed65f58950115f21530ae04afd0602b9
Unbundled builds might not have the prebuilt/sdk files, allow
the build to continue and then fail if the module is actually
built.
Test: m -j checkbuild
Change-Id: I21163778f1cc50945c7a12e57da0e39ba963aa7c
Arch specific properties were not being applied to modules
with OS set to Common.
Test: java_test.go
Change-Id: I8f1b49ca51b0cf96f78006dfcd121672e581d9c5
Using a glob as a path failed the existence check. Append the
glob after converting the path to a string.
Test: TestExcludeResources in java_test.go
Change-Id: Ic1fd40aa283f3b0d59c1c589dbeec411583eddf1