Commit graph

58748 commits

Author SHA1 Message Date
Joe Onorato
ba29f380d3 Move bazel from being a shell function to being a script at build/bazel/bin/bazel
Bug: 254713799
Test: b build //packages/modules/adb/apex:com.android.adbd
Change-Id: I6a0a89438a46d8252c3e0c24319038b0cf2dbd59
2022-10-24 06:38:11 -07:00
Jingwen Chen
3b13b61d9d Don't rely on TOP+OUT_DIR as the location for OUT_DIR.
OUT_DIR may not be in TOP (where the source tree is).

Test: presubmits
Test: set OUT_DIR=$HOME/out1; m --bazel-mode nothing

Fixes: 254022328
Change-Id: I8cf9fe2da3cdc0ba5489dfbe41d9d32f06ace83d
2022-10-21 09:39:12 +00:00
Krzysztof Kosiński
e0774afdd0 Merge "Globally enable -Wdefaulted-function-deleted." 2022-10-21 04:29:12 +00:00
Treehugger Robot
26e62c8d74 Merge "Set -fno-emulated-tls for riscv64" 2022-10-21 03:31:38 +00:00
Jiyong Park
61807339b8 Merge "Install appSet using InstallFileWithExtraFilesZip" 2022-10-21 00:17:52 +00:00
Colin Cross
e127b4d060 Merge "Disable LTO and CFI for riscv64" 2022-10-20 23:47:54 +00:00
Treehugger Robot
43d900926c Merge "Allowlist framework-javastream-protos and framework-cppstream-protos" 2022-10-20 23:46:19 +00:00
Christopher Parsons
90cc93fd6e Merge "Add prebuilts/ to microfactory includes" 2022-10-20 22:19:05 +00:00
Colin Cross
7c376043e0 Merge "Use static libclang_rt.ubsan_standalone runtime for musl" 2022-10-20 21:53:58 +00:00
Colin Cross
6b89a133b3 Merge "Update musl bindgen clang lib directory" 2022-10-20 21:53:43 +00:00
Treehugger Robot
714203c354 Merge "Update bindgen clang version to r468909b" 2022-10-20 21:53:42 +00:00
Colin Cross
2c435a00ff Set -fno-emulated-tls for riscv64
Building for riscv64 fails with link errors on __thread variables.
Set -fno-emulated-tls to fix it.

Bug: 254713216
Test: lunch aosp_riscv64-userdebug && m ALLOW_MISSING_DEPENDENCIES=true ndk_sysroot
Change-Id: I3dca81dfd277d681b6c868a5e8385e3a37335a5f
2022-10-20 14:31:24 -07:00
Vinh Tran
3cb9ade56b Allowlist framework-javastream-protos and framework-cppstream-protos
Mixed build between gensrcs and filegroup is currently broken (b/242847534 b/247782695). This CL allowlist the gensrcs modules to remove the mixed build instead.

Test: m framework-javastream-protos --bazel-mode-dev
Test: m framework-cppstream-protos --bazel-mode-dev
Bug: 254634154
Change-Id: Icbca336612fbee3a91604770c8903f011bee6edd
2022-10-20 17:17:32 -04:00
Colin Cross
ecf4e664e0 Disable LTO and CFI for riscv64
Building with LTO and CFI enabled for riscv64 causes link failures:
ld.lld: error: lto.tmp: cannot link object files with different floating-point ABI
ld.lld: error: undefined symbol: guard variable for android::hardware::BufferedTextOutput::getBuffer() const::ts

Disable them for now.

Test: lunch aosp_riscv64-userdebug && m ALLOW_MISSING_DEPENDENCIES=true ndk_sysroot
Change-Id: I3489952abebeeb3f4de664fd3e436232aac298d7
2022-10-20 13:59:58 -07:00
Treehugger Robot
7a7d58a847 Merge "[MTE] temporarily disable memtag-stack with exceptions" 2022-10-20 20:27:01 +00:00
Dennis Shen
2f951ceb69 Merge "cherrypick of ag/20211286" 2022-10-20 20:09:18 +00:00
Colin Cross
e725b4e5e0 Use static libclang_rt.ubsan_standalone runtime for musl
Using a dynamic libclang_rt.ubsan_standalone runtime causes
problems when dalvikvm dlopen's libart.so:
JniInvocation E 10-19 18:25:55 1159447 1159447] Failed to dlopen libart.so: Error relocating /mnt/disks/build-disk/src/android/master/out/host/linux-x86/lib64/libclang_rt.ubsan_standalone-x86_64.so: (null): initial-exec TLS resolves to dynamic definition in /mnt/disks/build-disk/src/android/master/out/host/linux-x86/lib64/libclang_rt.ubsan_standalone-x86_64.so

This seems to be caused by a thread local variable with an
explicit initial-exec TLS model in libclang_rt.ubsan_standalone,
which is then rejected by musl's dynamic loader.  Switching to
a static libclang_rt.ubsan_standalone matches what we are doing
for glibc and fixes musl.

Bug: 190084016
Test: m USE_HOST_MUSL=true out/target/common/obj/JAVA_LIBRARIES/ahat-test-dump_intermediates/test-dump-base.hprof
Change-Id: I3e50eae6c22b684fc7bb0ccdfe0379f41d246319
2022-10-20 19:45:53 +00:00
Muhammad Haseeb Ahmad
c0edf32732 Merge "Output shared dependendencies of JNI libs for Java fuzzers" 2022-10-20 19:16:20 +00:00
Treehugger Robot
95ac23eeeb Merge "Introduce BazelStringOrLabelFromProp." 2022-10-20 18:26:20 +00:00
Florian Mayer
7410d28356 [MTE] temporarily disable memtag-stack with exceptions
unwinding through tagged frames is fixed in upstream and cherry-picked
onto Android toolchain in https://r.android.com/2251926. until then, we
can disable stack tagging for code that uses exception, so we can get
some coverage before the toolchain update.

Test: stack_tagging_helper exception_cleanup from https://r.android.com/2175188
      fails with assertion "GetTag(&y) !=
      GetTag(__builtin_frame_address(0))" as expected
Bug: 174878242
Change-Id: I1597b21f64a92874dbccb64ffebbef7bb9bf8214
2022-10-20 11:17:42 -07:00
Dennis Shen
ff34e291d8 cherrypick of ag/20211286
update and create bundle config pb python library

update config.pb file to the source of truth:
google3/third_party/java_src/android_appbundle/bundletool/schemas/proto/config.proto

current config.pb is stale and needs update.

Also, add a python library host soong module config_proto, so that it
can be used by other python code.

BUG: b/240288941
TETS: tested along with primary_train_build_worker that reuse
BundleConfig.pb

Change-Id: I426a5cb7ec42573ed2110494c50813abc0a96296
2022-10-20 17:02:42 +00:00
Jingwen Chen
6817bbb3c8 Introduce BazelStringOrLabelFromProp.
Soong supports string properties, but they are overloaded, and can mean
one of three things:

* path reference
* module reference
* string literal

Bazel has different types: label and string attributes. Thus there needs
to be a way to categorize them correctly in bp2build.

This CL introduces a new function to be used on properties like
apex_key.private_key / apex_key.public_key, as well as
android_app.certificate / apex.certificate.

It is important to disambiguate the prop betenn a string literal
attribute or file/rule target label attribute, so this functions does
just that.  The new attributes are then further handled by their
respective macros (apex_key, android_binary, apex).

Bug: 253557437
Fixes: 253557437
Test: presubmits, new tests

Change-Id: Id8111cdd60d3aabcae7d17fe9da84d0ee3966023
2022-10-20 14:57:37 +00:00
Alex Márquez Pérez Muñíz Díaz Púras Thaureaux
c5184ec089 Rename prebuilt_library_* to cc_prebuilt_library_*
Follow the convention of everything else in `cc`

Test: CI
Change-Id: I133d0b7119d4e9b357aada3467bc079f20dc0f60
2022-10-20 14:51:55 +00:00
Yi Kong
a9e1df1522 Enable ICF=safe for host binaries as well
We regressed binary size when we switch Darwin to use LLD, because
Darwin LD64 does ICF by default. Turn on ICF for host binaries to regain
the binary size savings (saves some space for Linux as well).

Test: presubmit
Bug: 236924555
Change-Id: I433062c3d263d69e431c1552faf1f18b13c5da42
2022-10-20 14:45:52 +09:00
Jingwen Chen
230c57af16 Merge "Make cc_genrule.srcs configurable." 2022-10-20 05:34:02 +00:00
Jingwen Chen
85c0ef154b Merge "Denylist libapexinfo and libapexinfo_tests." 2022-10-20 05:34:02 +00:00
Muhammad Haseeb Ahmad
431ddf9b76 Output shared dependendencies of JNI libs for Java fuzzers
Test: m example_java_jni_fuzzer
Bug: 252846698
Change-Id: Ib583de335482350bfe293f9c3d021a595edd4f44
2022-10-20 00:55:58 +00:00
Chih-hung Hsieh
47907191e2 Merge "Disable external/grpc-grpc even with TIDY_EXTERNAL_VENDOR=1" 2022-10-19 19:36:03 +00:00
Yu Liu
d6201013eb Make cc_genrule.srcs configurable.
Also disallow arch variant of genrule.out.

This is to be consistent with bazel where we are migrating to.

Bug: 254114674
Test: Manual
Change-Id: I685a2e64102b7bb68128b39931f0bc85878bc6de
2022-10-19 12:35:26 -07:00
Yu Liu
6c999eff9a Denylist libapexinfo and libapexinfo_tests.
Bug: 254476335
Test: None
Change-Id: I7cb62bf5aaba0632d9c7e652cb3b23a5a5e35013
2022-10-19 16:41:10 +00:00
Chris Parsons
4d0b4df833 Add prebuilts/ to microfactory includes
This allows go sources under subdirectories of prebuilts/ to be
referencable by soong_ui and soong_build. Without this change,
microfactory does not correctly include go libraries under prebuilts.

Test: Conjunction with aosp/2260126
Change-Id: I4cba6fb04d1e274af759fa92f9ae4b2e3ea18447
2022-10-19 11:11:45 -04:00
Jiyong Park
f648d53154 Install appSet using InstallFileWithExtraFilesZip
This fixes a bug that only the primary output of an appSet is installed
when the appSet is part of a flattened APEX.

Bug: 247072627
Test: m GoogleExtServices on a device using flattened APEX.
system/apex/com.android.extservices.gms/priv-app/GoogleExtServices@TM
has these apks:

GoogleExtServices.apk  GoogleExtServices-arm64_v8a.apk
GoogleExtServices-hdpi.apk  GoogleExtServices-ldpi.apk
GoogleExtServices-mdpi.apk  GoogleExtServices-tvdpi.apk
GoogleExtServices-xhdpi.apk  GoogleExtServices-xxhdpi.apk
GoogleExtServices-xxxhdpi.apk

(before the fix, there only was GoogleExtServices.apk)

Change-Id: Icbc4dd002f856a3f751badec781ad132c423ac9b
2022-10-19 18:22:37 +09:00
Kiyoung Kim
bdb7495fe5 Remove unused module definitions in library stub
There are some module definitions which are implemented for the proof of
concept, but these modules are not in use now. This change removes
unused module definitions to reduce confusion.

Bug: N/A
Test: m nothing passed
Change-Id: I9b8efbc368436eaef66a4e6557006e87c0c27713
2022-10-19 04:04:55 +00:00
Bob Badour
76e39981e1 Merge "Add protobuf definition for METADATA files." 2022-10-19 02:04:50 +00:00
Chih-Hung Hsieh
ff2efae9b0 Disable external/grpc-grpc even with TIDY_EXTERNAL_VENDOR=1
Some projects do not allow or fix tidy warnings to
avoid warnings-as-errors. They should not run
clang-tidy even with TIDY_EXTERNAL_VENDOR=1.

Bug: 244631413
Test: presubmit; TIDY_EXTERNAL_VENDOR=1 make tidy-external_subset
Change-Id: Id86a55c222fdad813c1c3434245c86bb97d0cad6
2022-10-18 18:58:50 -07:00
Chih-Hung Hsieh
d21c46a5f8 Allow default clang-tidy checks
This will avoid suppressing all checks in user defined
.clang-tidy config files.

Bug: 252877310
Test: TIDY_EXTERNAL_VENDOR=1 make tidy-soong_subset
Change-Id: I99032300542e9b83cba60b00f8d328c63b5728e2
2022-10-18 21:12:19 +00:00
Colin Cross
645874d0cd Update musl bindgen clang lib directory
Musl libclang.so is in musl/lib, not musl/lib64.

Bug: 216192129
Test: m USE_HOST_MUSL=true host-native -k
Change-Id: Id12630d5c0f51d85278f8562b3d988458a56021a
2022-10-18 12:26:05 -07:00
Colin Cross
8a5a1e2074 Update bindgen clang version to r468909b
r468909b is the first version to contain musl libclang.so.

Bug: 216192129
Test: m checkbuild
Change-Id: If4c986e285914ca909981ea5dc972c3047c2ac7c
2022-10-18 12:25:05 -07:00
Treehugger Robot
17b8795814 Merge "add comments to keep STL code in sync with Bazel" 2022-10-18 13:49:12 +00:00
Steven Moreland
74f750db87 Merge "Revert "ninja error on missing files"" 2022-10-18 00:15:11 +00:00
Steven Moreland
28d35a1f1e Revert "ninja error on missing files"
This reverts commit 10ea6214a1.

Reason for revert: b/254136231

Change-Id: I68884b0540557b9abc9e6661c1ff5dbeb7e9816d
2022-10-18 00:13:59 +00:00
Treehugger Robot
d1c40db794 Merge "Revert "Pin javadoc to JDK 11"" 2022-10-17 21:47:49 +00:00
Steven Moreland
37368d54a5 Merge "ninja error on missing files" 2022-10-17 21:29:29 +00:00
Steven Moreland
10ea6214a1 ninja error on missing files
Bug: 253517226
Bug: 253694455
Change-Id: I24da473198958a0e82a5a6e10c3f3180bf5dcc41
Test: N/A
2022-10-17 21:28:53 +00:00
Vinh Tran
827db14152 Merge "Default apex's compile_multilib to "first" in bp2build" 2022-10-17 14:12:29 +00:00
Sorin Basca
4ad3dc66c3 Revert "Pin javadoc to JDK 11"
Revert submission 2211596

Reason for revert: No longer needed after aosp/2215568

Change-Id: Ia770525501d89baa25e22c2df4fb098d056743f6
2022-10-17 07:56:00 +00:00
Spandan Das
91e8d3d00c Merge "Update documenation for default value of sdk_version" 2022-10-15 04:13:32 +00:00
Treehugger Robot
78a966cadb Merge "Bump up errorprone heap size" 2022-10-15 02:40:25 +00:00
Cole Faust
5aab68524c Bump up errorprone heap size
ag/19500070 causes errorprone to fail with out of memory errors.
Also in aosp/2215048 the regular javac heap sized was increased
to 4096MB, so the errorprone heap size wasn't any larger anymore.

Bug: 240473481
Test: m RUN_ERROR_PRONE=true SystemUIGoogleScreenshotTestsLib on internal master
Change-Id: Ie6bdce9f2e7620c076213f4c3313960fd537967b
2022-10-14 15:54:13 -07:00
Bob Badour
59f84a5283 Add protobuf definition for METADATA files.
Test: m droid

Change-Id: I48aa576bb97bf5ae9e61bc29cea8b0e9b4232cdd
2022-10-14 15:10:48 -07:00