Commit graph

58759 commits

Author SHA1 Message Date
Cole Faust
b2ea6c193e Merge "Remove flags that enable the new python path behavior" 2022-10-23 19:19:00 +00:00
Cole Faust
caf766b74f Remove flags that enable the new python path behavior
The new behavior has been enabled by default, and these
flags aren't necessary anymore.

Fixes: 245583294
Test: m py_dont_import_folder_of_entrypoint_test && /ssd/aosp-master/out/host/linux-x86/testcases/py_dont_import_folder_of_entrypoint_test/x86_64/py_dont_import_folder_of_entrypoint_test
Change-Id: I5b6f98da51791bc5d28662ef799a10c1bb6a35a0
2022-10-21 16:07:56 -07:00
Vinh Tran
a38504fd11 Merge "Disable converted filegroups in mixed build" 2022-10-21 23:00:34 +00:00
Rex Hoffman
8165dd6941 Merge "Enable new_robolectric" 2022-10-21 22:17:27 +00:00
Vinh Tran
ce77a337ee Disable converted filegroups in mixed build
Bug: 254796426
Test: m libplatformprotos --bazel-mode-dev
Change-Id: I03f4f4847f8dafc3291c1cceed2dd62be4c91746
2022-10-21 16:48:37 -04:00
Romain Jobredeaux
7c4ef0718c Merge "Add Soong metric variable to indicate whether bazel mixed build was force-disabled." 2022-10-21 18:22:02 +00:00
Rex Hoffman
54641d2aec Enable new_robolectric
Allow new robolectric to break soong's exepected machine type restrictions

Test: mma in /external/robolectric
Bug: 244627502

Change-Id: If58a36b2d84804d586d9c8a773e2e739867fa987
2022-10-21 17:53:40 +00:00
Mark Dacek
99db041a14 Merge "Add bazel staging mode to soong build." 2022-10-21 17:38:43 +00:00
Cole Faust
c52527364f Merge "Fix bazel builds with unspecified arch" 2022-10-21 17:34:31 +00:00
Romain Jobredeaux
ea098efcd8 Add Soong metric variable to indicate whether bazel mixed build was force-disabled.
Test: unit tests
Change-Id: I17b96edd28ace5a29a6889d6f003b6a38dbeb68e
Bug: 254649740
2022-10-21 15:50:01 +00: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
Cole Faust
f5eae990bc Fix bazel builds with unspecified arch
//build/bazel/platforms:android_target is an alias to
android_{arch}, so on bulids like "ndk" that don't
specify an arch, it fails.

It's also questionable if we should be setting the
platform to android in a mixed build in the first
place. What if we were mixed-building a host tool?

This reproduces when running
`OUT_DIR=out ./build/soong/scripts/build-ndk-prebuilts.sh`
with aosp/2263623. That script specifies --soong-only,
which is important because even without bazel, `m nothing`
on ndk-userdebug will fail with errors in makefile code.

Bug: 254701254
Test: Described above
Change-Id: I34cae0287830a19c4865fbd398f3c4e1ee1d2d66
2022-10-20 16:49:30 -07: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
MarkDacek
b78465de1d Add bazel staging mode to soong build.
This is to use bazel to build targets that are being prepared for an
incipient release to the prod mode allowlist.

Bug: 254265047
Test: m nothing
Test: m nothing --bazel-mode-dev
Test: m nothing --bazel-mode-staging
Change-Id: Ic78a59cf51dba83ef1ac26483586560ea9b24aaf
2022-10-19 15:57:18 +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