Go 1.21 modifies the file limit but restores the original when
execing subprocesses if it hasn't be overridden. Call Setrlimit
even if it doesn't appear to be necessary so that the syscall package
considers it set.
Bug: 309895579
Test: m nothing
Change-Id: I4d0b27bac90a2a88bfc68a8491d54dc106e1ec13
This change defaults Java stubs to be generated from API text files
during build. Using the `--build-from-source-stubs` flag, users can
toggle between the feature.
This change relands aosp/2617457.
Test: m nothing && verify ninja path exists between android_stubs_current and android_stubs_current.from-text, and does not exist between android_stubs_current.from-source, m nothing --build-from-source-stub && verify the opposite
Bug: 301522358
Change-Id: Ic129dafc3231e71470af982374739930947b69cb
This allows product config to determine what build flags are present in
a product's build, as well as their value.
As product config moves to a declarative specification, this can be
handled with less unnecessary work.
Bug: b/302593603, b/308849337, b/309477343
Test: manual
Change-Id: Ic0551990864bba6d03b6bf49fcfd4ae2523d9c6d
This allows product config to determine what build flags are present in
a product's build, as well as their value.
As product config moves to a declarative specification, this can be
handled with less unnecessary work.
Bug: b/302593603
Bug: b/308849337
Test: manual
Change-Id: If57622059bb7d1c33df7498321db621c0c2d30c0
Jacoco uses ziptime and then merge_zips. merge_zips is already rewriting
all the zip headers so its trivial to move the ziptime functionality
into merge_zips.
Bug: 308765940
Test: TestMergeZips
Change-Id: I8158c0b99878492233ac01fde3820e1951c9088e
Start a background goroutine at the beginning of soong_build that
captures the CPU usage, heap size, and total system memory every
second. Propagate the values through soong_build_metrics.pb back
to soong_ui, and then into build.trace.gz.
Test: m nothing, examine build.trace.gz
Change-Id: Iad99f8f1f088f4f7f7d5f76566a38c0c4f4d0daa
This reverts commit 182b56b870.
Reason for revert: prime suspect for breaking boot tests b/307495247, b/307411752
Bug:307495247
Change-Id: Iea05703b767d2699ca3cf69377eb44b1d21697ad
This change defaults Java stubs to be generated from API text files
during build. Using the `--build-from-source-stubs` flag, users can
toggle between the feature.
Test: m nothing && verify ninja path exists between android_stubs_current and android_stubs_current.from-text, and does not exist between android_stubs_current.from-source, m nothing --build-from-source-stub && verify the opposite
Bug: 274805756
Change-Id: I28834f92c1b1311e3fe0a71a6ea9e8ec2e278d7e
Cleanspec wasn't working, so let's handle it in Soong
Test: create an invalid file, run m nothing, verify it is removed
Change-Id: I55d3c9344541b8e504887225a660044e14204427
It looks like hardware/qcom/sdm710 no longer exists in the source tree, so this symlink removal is should no longer be needed?
Bug: n/a
Change-Id: I8c9c6c0c0371039f910fc4290f81a692e4cd5cd4
This involves some minor changes to testing infrastructure.
This is a rollforward of aosp/2628496 with a couple of minor changes:
- In ParseBuildFiles, filter out all build files that are kept due
to ShouldKeepExistingBuildFileForDir
- Add some minor test infrastructure for StubbedBuildDefinitions, with a
couple of proof of concept tests used to demonstrate its usage. This
pattern will become immensely more common as we implement allowlist v2
(as we will need to update all tests which today simulate build
definitions that have missing deps)
Bug: 285631638
Fixes: 286545783
Test: bp2build.sh
Test: m nothing
Change-Id: I7c3a03b02098e39dd8e51d327482b440f294478f
The RuleBuilder API would not expand Ninja variables because the
variables would be written verbatim to the sandbox manifest file. This
commit allows a rule to specify that the manifest file should be written
in an un-escaped format so that Ninja variables are expanded before
writing the manifest file.
Bug: 286077158
Test: rust sandboxing topic + go test
Change-Id: I1915431f6e24d04d343dacc213c9079674ec8251
This feature is obsolete.
This makes a large number of codepaths "dead code" (such as
module-specific implementations of ApiBp2build functionality). These
will be deleted in a followup CL.
Bug: 284029211
Test: Presubmits
Change-Id: Ib53b99f1fe8c24380d219caf44e9bb3b96724fa0
writeHeader generates zip64 extras that are correct for the local
header, but incorrect for the central directory header. Strip the
extras again after writeHeader so that the central directory header
extras are recreated correctly.
Test: Zip2Zip64
Bug: 296314205
Change-Id: I1ca6a5745a9f97426df6c111db444facdfa25b2e
Revert submission 2651299-bazel_sandwich
Reason for revert: b/293883239, checking if this breaks the build.
Reverted changes: /q/submissionid:2651299-bazel_sandwich
Change-Id: I5f1d4bb13d21e6599f5c353dcaba2375f5ec234d
The "bazel sandwich" is a mechanism for bazel to depend on make/soong
outputs. The name comes from the fact that bazel is now at the top
and bottom of the build graph. This is intended to allow us to work
on converting the partition builds to bazel while not all of the
dependencies of the partition have been converted.
It works by adding the bazel_sandwich_import_file rule, which emits a
dangling symlink that starts with bazel_sandwich:, and includes
information that the aquery handler in soong reads. The aquery handler
rewrites the symlink so that it points to a file generated by
make/soong, and adds a ninja dependency from the symlink to the file
it's targeting.
This allows us to depend on make-built files from bazel, but notably
it doesn't allow us to depend on analysis-time information from make.
This shouldn't be a problem for the partitions, but limits the use of
the bazel sandwich to similar, less complicated types of builds.
go/roboleaf-bazel-sandwich
Bug: 265127181
Test: m bazel_sandwich
Change-Id: Ic41bae7be0b55f251d04a6a95f846c50ce897adc
kotlinx_coroutines_test and kotlinx_coroutine_android each provide a
META-INF/services/kotlinx.coroutines.CoroutineExceptionHandler with
different contents, and the final contents needs to be the combination
of the two files. Implement service merging in merge_zips when the
-jar argument is provided.
Bug: 290933559
Test: TestMergeZips
Change-Id: I69f80d1265c64c671d308ef4cdccfa1564abe056
This allows us to set product variables as build settings instead
of loading them from a target's provider, which further allows us
to read product config variables in transitions.
Bug: 287539062
Bug: 269577299
Test: Presubmits
Change-Id: I8497703f706162572ceb3486240e1eb02a37f5f6
The only difference between preprocessed + presigned vs just presigned
is that just presigned will zip align the apk, and preprocessed +
presigned will instead check that the apk is already aligned and has
uncompressed jni and dex libs. This should be the default to ensure
we're getting valid apk imports from external sources.
Presigned alone also won't work for apps with target sdk >= 30, because
on those target sdks you have to use apk signature v2, and having the
build system align the zip file will break that signature.
Bug: 185811447
Test: Presubmits
Change-Id: Ie825ab2eab4feeda5c266233a9dca7bbf9559be7
This reverts commit bcfadce598.
Because now test_compiler.py copies clang-dev instead of creating a
symlink.
Bug: 288327832
Test: run test_compiler.py
Change-Id: Ib676a41c152046d710d73fdaac678d8a98de5af2
Also applied this feature to kotlinc since it needs both java and kt files.
Test: local test and presubmits
Bug: 287071909
Change-Id: I28c725b03115aef47055448cb75412980015da15
From the previous change, build.ninja is generated as a symlink of
build.<product>.ninja for any missing use case of build.ninja. As this
was a temporary solution while introducing new changes, removing this
feature and move all build.ninja usage into build.<product>.ninja.
Bug: 277029044
Test: aosp_cf build succeeded
Change-Id: I6e8d2840491654fa4253b1febfaecf0ee9455a2d