This causes us to align the text section to 4KiB, not just the data
section. From the bug that added this for arm64, there was an admission
that it costs 17MiB across the tree, and a not entirely convincing claim
of a performance improvement (undermined by the fact that "some stuff
was faster, some stuff was slower"). See http://b/150506341 for that.
Anyway, let's assume we don't want this for riscv64 for now.
Test: `mm -j` in bionic and readelf on the resulting libtest_empty.so
Change-Id: I0ed592a97ef705175191d9c66271a599af4eb18f
Bug: b/258870895
Test: run `m --bazel-mode nothing && touch bionic/docs/BUILD.bazel && m --bazel-mode nothing` Then verify symlink_forest reran and `out/soong/workspace/bionic/docs/BUILD.bazel` does NOT exist
Change-Id: I49797fe52b3e0fb6ffe17ed57b8da0b69628fd7e
Add a new argument in soong_ui that will be used to gate this behavior.
This approach is expected to solve incrementality issues in multi-tree.
As part of soong's bootstrap process, all source dirs are added to deps
of out/soong/build.ninja (via globs). Since multitree_build writes to the
"source" api_surfaces directory, it changes its mtime and causes a
recompilation of out/soong/build.ninja in the subsequent invocation.
Test: TH (for single-tree)
Test: Inspected ninja files (for multi-tree)
(Run a full build)
touch out/api_surfaces/vendorapi/libc/.../math.h
orchestrator/prebuilts/build-tools/linux-x86/bin/nsjail --config
out/trees/vendor_aosp_cf_arm64_phone/nsjail.cfg --
prebuilts/build-tools/linux-x86/bin/ninja -f out/soong/bootstrap.ninja
-d explain -n out/soong/build.ninja
(ninja: no work to do)
Change-Id: Ib823163ec1153344a2f593daa8d7156c24ff5bc3
This ensures that soong_ui is successful in setting up its own nsjail in
workflows that externally make the source tree ReadOnly (e.g. a nested
nsjail in multitree).
Test: TH
Change-Id: I6d0ec4a9fffda1d4e5996f475da611e1deb0888d
Bazel is expected to generate some files and symlinks that will not be
created by aquery, we explicitly ignore files that are in bazel output
paths but are not in a generated file directory.
Test: $ m --bazel-mode-staging checkbuild and verify it gets past
dangling rule test
Fixes: 258396112
Change-Id: I6dc45ea2613c9e1488ad3eda2313033c717217ff
The sdk snapshot must not be including implementation code for boot
libraries, the implementation is provided by dex jars within the
corresponding APEX. However, the snapshot does need a module for each
boot library so that the build can seamlessly access the dex files from
the APEX.
A java_library boot library (like core-oj) is represented in the
snapshot by a java_import module which requires a jar file to be
provided, otherwise it is disabled. However, that is provided purely
to keep Soong happy and should never be used.
Previously, the snapshot would contain an empty file for the jar. As
an empty file is an invalid jar any tool (like compiler) that tried
to consume it would fail which was the correct behavior. Unfortunately,
the error message that was produced was not very helpful, it was just
some variant on `invalid file` which lead to a lot of bugs being
raised.
This change replaces that empty file with a reference to the output
from a genrule which runs a script which produces a more useful error
message, with information on how to fix the issue, and fails the build.
It also adds a Name() method to the SdkMemberProperties type as that is
needed in AddInternalModule() to construct the name of the additional
module.
Tested as follows:
In AOSP/master make the following changes:
1. Temporarily set visibility on core-oj and core-libart to
//visibility:public.
2. Run packages/modules/common/build/mainline_modules_sdks.py to create
the snapshots.
For each of the S, T and latest snapshots I did the following in the
s-aml-prebuilt-test, t-aml-prebuilt-test and aosp/master branches:
1. Created an Android.bp file containing the following:
java_library {
name: "broken",
static_libs: [
"prebuilt_core-libart",
"prebuilt_core-oj",
],
}
2. Fix the visibility issues and run `m broken` where it fails with an
invalid file.
3. Delete the contents of the prebuilts/module_sdk/art/current/sdk
directory.
4. Unpack the relevant version of the art-module-sdk snapshot into the
directory.
5. Run `m broken` where it fails with the helpful message.
6. Test the instructions on how to use the ninja -t path tool to
identify the cause of the problem and fix it.
Bug: 257969510
Test: See above.
Change-Id: I125bde2d7202afff84c97daebcef37e21c548a3a
Make cc_api_variant's header property as arch variant, so headers can be
differed by arch variant
Bug: 244244438
Test: Panther vendorimage build succeeded
Change-Id: I400301793209c9e0214fc118cd4981194d507fbd
AfdoAdditionalProfileDirs is unconnected to build/make/core/soong_config.mk and is currently unused. Removing AfdoAdditionalProfileDirs will cut down on complexity when we migrate the support of auto-fdo profiles to Bazel cc rules.
b/258684450 proposes an alternative to support the use cases that were meant to be supported by AfdoAdditionalProfileDirs.
Test: existing go tests
Bug: 253540178
Change-Id: I024e48598a560717a1d6c19b16bde3fe65ff1961
relPwd is only set if runtime.GOOS != "darwin" but is used
unconditionally. Instead, unconditionally set relPwd using the
cc.PwdPrefix() helper.
Bug: 238165437
Test: m timeInState.o
Signed-off-by: Connor O'Brien <connoro@google.com>
Change-Id: I5294bb6ea95dad60fbf64e9d958e1f1b32a02a48
Enabling BTF leads clang to generate debug line info that includes the
absolute path to the source file. For C++ modules the
-fdebug-prefix-map flag is used to convert these to relative paths. Do
the same for BPF programs when BTF is enabled.
Test: build timeInState.c; strings shows only relative path to source
file
Bug: 238165437
Signed-off-by: Connor O'Brien <connoro@google.com>
Change-Id: Ie4ebc8f9a7d115baeddde5c7ac3ae710335ddf13
IsLlndk() returns whether the library is an LLNDK stub. The ABI check
should identify LLNDK implementation by isImplementationForLLNDKPublic().
Test: development/vndk/tools/header-checker/utils/create_reference_dumps.py \
&& make
Bug: 227282691
Change-Id: I570871e24d9029992a722b3052f8bb6e7f3c0f52
There is no cflags defined for cortex-a9 CPU variant, set it to ArmGenericCflags to fix the mixed build breakage for now.
Bug: 258397103
Test: m com.android.build --bazel-mode-staging
Change-Id: I79a9877846ced6334c09a4f5caf115c436f600e6