Commit Graph

7431 Commits

Author SHA1 Message Date
yangbill
22bafec042 Propagate data_bins from Soong to Make
Write the list of a test module's data_bins value to the
`LOCAL_TEST_DATA_BINS` Makefile variable defined for each module.
This enables downstream tools to correctly set up the runtime
environment for execution. And currently only sh_test, cc_tests, and
rust_tests has this attribute in Android.bp.

Bug: 215234071
Test: m out/soong/Android-aosp_cf_x86_64_phone.mk
Change-Id: I8d47f5f9b25afdc5975c6b414405badb38dbde4b
2022-02-17 04:06:34 +00:00
Colin Cross
d42fcae75f Merge "Add --sysroot /dev/null to musl compiles" am: e4c400bef5 am: 69324f735d am: b5e24d257f
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1983627

Change-Id: Id40f845a799bc1ed8fc565ed9c909946bacbf6d2
2022-02-17 00:40:40 +00:00
Colin Cross
8e16fe0ab1 Merge "Fix transitive whole_static_libs on prebuilt static libraries" am: 4dac32ad1a am: a0c26cc3cc am: 2a102c8147
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1983626

Change-Id: I28cc4d8d706f3a58b36ecf5ef93163b6d54b7858
2022-02-17 00:40:28 +00:00
Chih-Hung Hsieh
57da82697a Do not add non-existing -Bprebuilts/gcc/.../bin
* Only prebuilts/gcc/linux-x86/host/x86_64-w64-mingw32-4.8/x86_64-w64-mingw32/bin
  exists for x86_windows_host.
* Remove config.ToolPath;
  add required -B flags into ToolchainCflags and ToolchainLdflags.

Bug: 218883919
Test: make droid tidy-soong_subset
Change-Id: I9a18bf8cc0cf84e091c7463b3bda316eaab53aa3
2022-02-16 15:49:39 -08:00
Colin Cross
e4c400bef5 Merge "Add --sysroot /dev/null to musl compiles" 2022-02-16 23:32:51 +00:00
Colin Cross
4dac32ad1a Merge "Fix transitive whole_static_libs on prebuilt static libraries" 2022-02-16 23:32:45 +00:00
Colin Cross
675695eb62 Merge "Add builtins and minimal runtime as dependencies instead of flags" am: 251d6500db am: 64ef5e9968 am: 5cf058abab
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1980448

Change-Id: Ie4790bbc44955a4762316eb2bb9657dd63af0364
2022-02-16 20:45:22 +00:00
Colin Cross
251d6500db Merge "Add builtins and minimal runtime as dependencies instead of flags" 2022-02-16 18:59:55 +00:00
Treehugger Robot
1cc29d1787 Merge "Compare tidy_disabled_srcs list by string values" am: ec76c2f072 am: 9f60d66aa9 am: 835b8ef450
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1987286

Change-Id: I57c369f5c2f457bd386d2f513857691ecb6312d4
2022-02-16 05:24:51 +00:00
Treehugger Robot
ec76c2f072 Merge "Compare tidy_disabled_srcs list by string values" 2022-02-16 03:02:37 +00:00
Chih-Hung Hsieh
8439a141a7 Compare tidy_disabled_srcs list by string values
* Cannot use android.Path as key because some srcs and
  and tidy_disabled_srcs items could have the same path
  string but different android.Paths objects.

Bug: 219783146
Test: make tidy-soong_subset
Change-Id: I82e25ec9678ce998feccf361d69ae66dae0905de
2022-02-15 15:32:57 -08:00
Liz Kammer
2c2afe26ea Fix typos in arch_list and do variant validation
Test: m nothing
Change-Id: Icfbc9f886a1e16abe02bf6c61671b8187a699942
2022-02-15 17:26:35 -05:00
Sam Delmerico
c768102bce convert java proto libraries with bp2build
Allow java_libraries that depend on protobufs to be converted with
bp2build.

Bug: 215230097
Test: build/bazel/ci/bp2build.sh
Change-Id: I3ce52389e7e4e82755605ee277c1e527a6aebc6b
2022-02-15 21:04:59 +00:00
Pirama Arumuga Nainar
8a4804f53b Reland "Switch to clang-r445002"
Bug: http://b/214080353
Bug: http://b/218805949

Reland switch to clang-r445002.  The math test failures are fixed by
disabling FMA (-ffp-contract=off).

Test: - atest -a libcore.java.math.RunCSVTestsStrict
      - select bionic tests on go/abtd
      - atest -a \
gatm_algo_test:gatm_algo_test.TestAllGatmTestData/GatmAlgoTest#VerifyOutputValues/05temporaltracing_5frames_1lux_h_drc_free
      - presubmit

Change-Id: I8383edb116caa63884507932406a5f49a223d006
2022-02-15 17:27:30 +00:00
Yi Kong
2f9bef3426 Merge "Don't reduce inline limit for afdo enabled projects" am: 1ca54b2cfd am: 10b71eb414 am: 9e56a9cb3e
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1984569

Change-Id: I84c2225a8bd74f8c784db56f1df373c562f71e45
2022-02-14 21:18:57 +00:00
Yi Kong
1ca54b2cfd Merge "Don't reduce inline limit for afdo enabled projects" 2022-02-14 20:33:40 +00:00
Yi Kong
4ef5459f7d Don't reduce inline limit for afdo enabled projects
Test: presubmit
Change-Id: Id964165c7af50da9cd5e92c25ad2c4191eb2147a
2022-02-14 20:02:04 +08:00
Chih-hung Hsieh
061c3b5234 Merge "Split the clangTidyRE rule" am: 1ead213e6d am: 44ec636d91 am: 00c541a9dc
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1980668

Change-Id: Iaca7fffc976bd0c91e5d829ec183ed2a9b8a3863
2022-02-12 05:40:11 +00:00
Chih-hung Hsieh
1ead213e6d Merge "Split the clangTidyRE rule" 2022-02-12 04:45:06 +00:00
Chih-Hung Hsieh
c74f63eeff Split the clangTidyRE rule
* Add clangTidyDepRE, which is an order-only dependent of
  the new simplified clangTidyRE rule.
* Remove escapeSingleQuotes, used only by the old bash command.
* Remove extra space when TIDY_TIMEOUT is not defined.
* In clang-tidy calls,
  use moduleFlags to match the clang/clang++ commands.

Bug: 218937424
Test: make droid tidy-soong_subset
Change-Id: I162e2318410741ab61fb2bb338725b000a3f148d
2022-02-11 17:21:56 -08:00
Colin Cross
0728720d45 Merge changes Ibd19d9a5,Icfc42ad7,Ieafdcceb am: 7b2e5cd134 am: 4a9761befe am: 14eea8f7d5
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1980449

Change-Id: I605243788a153758a9ebdddd4250d65efdf1f5ab
2022-02-11 23:57:03 +00:00
Colin Cross
7b2e5cd134 Merge changes Ibd19d9a5,Icfc42ad7,Ieafdcceb
* changes:
  Fix musl clang triple
  Add musl_<arch> and glibc_<arch> properties
  Add libc_musl as a dependency of RuleBuilderCommand.BuiltTool
2022-02-11 23:09:27 +00:00
Colin Cross
6745a8ef1d Add --sysroot /dev/null to musl compiles
Prevent linking against host glibc libraries by passing
--sysroot /dev/null to compile and link rules targeting musl.

Bug: 190084016
Test: m USE_HOST_MUSL=true host-native
Change-Id: Ief2c9507af9ae7cf5376cb874fcef0f2cbaf9994
2022-02-11 13:51:41 -08:00
Colin Cross
a2bcf2c4b8 Fix transitive whole_static_libs on prebuilt static libraries
whole_static_libs on static library usually uses the .o files from
the dependency, but on a prebuilt static library has to use the .a file.
whole_static_libs on a static library that itself has whole_static_libs
on a prebuilt static library also needs to use the .a file transitively.

Test: TestWholeStaticLibPrebuilts
Change-Id: I9d4aabf72be0941b461a72e610f2b28287251cb2
2022-02-11 13:51:41 -08:00
Treehugger Robot
ee18fb6589 Merge "Add error message for unsupported x86 arch variant" am: 104ecf6708 am: baeeb601cc am: ca7d468a5d
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1980008

Change-Id: I02dff31376d00f8912036cb89956139fee9b60d6
2022-02-11 14:38:37 +00:00
Treehugger Robot
104ecf6708 Merge "Add error message for unsupported x86 arch variant" 2022-02-11 13:55:43 +00:00
Treehugger Robot
82f65281f6 Merge "Propagate runtime_libs from Soong to Make" am: b451101f6e am: 7966092c95 am: 3489f67ca8 am: 8a5ab8baf9
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1976466

Change-Id: I2247f4ba15ced638933acc06735cbefd9a7b543f
2022-02-11 02:07:40 +00:00
Treehugger Robot
b451101f6e Merge "Propagate runtime_libs from Soong to Make" 2022-02-11 00:56:26 +00:00
Liz Kammer
f610a74f4c Add error message for unsupported x86 arch variant
Previously this would result in a Ninja variable lookup, instead, let's
error sooner in Soong.

Test: CI
Change-Id: Ib3e15dce84364e6f7a83b82cb5f0e8694ffc9d2a
2022-02-10 16:58:08 -05:00
Colin Cross
06c80eb851 Add builtins and minimal runtime as dependencies instead of flags
Use dependencies instead of libflags to link libclang_rt.builtins
and libclang_rt.ubsan_minimal.

Test: m checkbuild
Change-Id: I403cee0fb8cc21c347b42d8f8a3c20d6f43337a4
2022-02-10 11:50:31 -08:00
Colin Cross
72ee67659d Fix musl clang triple
Use x86_64-linux-musl and i686-linux-musl as the clang triple when
targeting musl.

Bug: 190084016
Test: m USE_HOST_MUSL=true host-native
Change-Id: Ibd19d9a5fbf4b67950745480d1e0ed8e02eeeba1
2022-02-10 11:50:31 -08:00
Liz Kammer
df191be7ec Merge "Create subdir for cc rules." am: da0b38772d am: 4a223606eb am: ccb7a63768 am: 1add73dc46
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1963459

Change-Id: Ie77c0cfc5324bd3c0d78b7bc949fa5f507747808
2022-02-10 15:09:43 +00:00
Nicolas Geoffray
ddc1b5b56f Merge "Revert "Switch to clang-r445002"" am: 2b2d9392fc am: 9bd52c7f71 am: 61bbe44e53 am: 6e5d419d34
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1976654

Change-Id: Id70eabf8070bbc0ddcb4ab96fe8ec4f7a5868592
2022-02-10 15:09:30 +00:00
Liz Kammer
da0b38772d Merge "Create subdir for cc rules." 2022-02-10 14:16:07 +00:00
Nicolas Geoffray
2b2d9392fc Merge "Revert "Switch to clang-r445002"" 2022-02-10 14:15:46 +00:00
Nicolas Geoffray
83b2b326b7 Revert "Switch to clang-r445002"
This reverts commit d950ab8bb3.

Reason for revert: Breaks Java math tests
Test: atest libcore.java.math.RunCSVTestsStrict

Change-Id: Ief6d0422fda991616afa59f5ce419aee5ac26a58
2022-02-10 09:58:50 +00:00
Yi Kong
71198ac516 Turn on Unique Internal Names for AFDO
AutoFDO uses a function’s symbol name to look up profile data but
functions with internal linkages do not have globally unique
identifiers. This can lead to name conflicts leading to missing profiles
and performance. We are enabling compiler option
-funique-internal-linkage-names for AFDO builds that will uniquefy
internal linkage symbols making this problem go away.

This CL might regress the performance due to mismatched profiles. It
will recover once we update the profiles.

Test: presubmit
Bug: 218448389
Change-Id: I92a2b6f72b52faab79aec9148f1962111bad7232
2022-02-10 08:09:38 +00:00
yangbill
6db86e5f01 Propagate runtime_libs from Soong to Make
Write the list of a module's runtime-required libraries to the
`LOCAL_RUNTIME_LIBRARIES` Makefile variable defined for each module.
This enables downstream tools to correctly set up the runtime environment
for execution.


Bug: 215243373
Test: out/soong/Android-aosp_cf_x86_64_phone.mk

Change-Id: Ia64a75cfba27af0202973d749d02620b355ec802
2022-02-10 06:19:31 +00:00
Treehugger Robot
a3cb9b7fe6 Merge "Escape cc ldflags in bp2build conversion" am: 9deb87e8e2 am: e2f1b14961 am: 04bf233677 am: ef3b27ec23
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1973479

Change-Id: Ia6d24953475454388ff4dbc5fe194c1f2608332b
2022-02-10 00:15:44 +00:00
Treehugger Robot
9deb87e8e2 Merge "Escape cc ldflags in bp2build conversion" 2022-02-09 23:05:01 +00:00
Pirama Arumuga Nainar
64db9c71c9 Merge "Switch to clang-r445002" am: 111817435a am: db6af1e8d3 am: 5f83a7f3bc am: 867de48cbe
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1961820

Change-Id: I1b306bde187576daaa3c337045ffdc34ca700d0f
2022-02-09 20:03:48 +00:00
Pirama Arumuga Nainar
111817435a Merge "Switch to clang-r445002" 2022-02-09 18:55:08 +00:00
Treehugger Robot
310e688d18 Merge "Add package for printing starlark formatted data" am: 5974423b06 am: f768e9d92a am: 39c446e760 am: fced333be4
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1971139

Change-Id: Iea83ff9e2ccb520584801fed3d48602784afd677
2022-02-09 05:49:20 +00:00
Treehugger Robot
5974423b06 Merge "Add package for printing starlark formatted data" 2022-02-09 04:48:33 +00:00
Chih-hung Hsieh
ff96c3eaee Merge "Use only single dash for tidy flags" am: def9bf2c1c am: df8fe32206 am: 31989351ac am: 05c54e2b71
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1972547

Change-Id: Iba7ea388f51c7950eab13d7e0fbae3058011e4f7
2022-02-08 23:23:17 +00:00
Liz Kammer
72beb34609 Add package for printing starlark formatted data
Bug: 216168792
Test: build/bazel/ci/bp2build.sh
Change-Id: I3a06b19396f7ffe1c638042cda7e731dd840f1d6
2022-02-08 17:32:28 -05:00
Chih-hung Hsieh
def9bf2c1c Merge "Use only single dash for tidy flags" 2022-02-08 22:13:47 +00:00
Treehugger Robot
8c1bec5dac Merge "Use -fno-sanitize-link-runtime for bionic sanitizers" am: 3e7f5c411d am: 8793c78b35 am: 0959ae13e7 am: deb07ed7e0
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1975927

Change-Id: I5836b7e8e3f0af826615d305b2ba84b6f054a9e4
2022-02-08 21:30:08 +00:00
Treehugger Robot
3e7f5c411d Merge "Use -fno-sanitize-link-runtime for bionic sanitizers" 2022-02-08 20:33:43 +00:00
Yu Liu
24003e9c28 Merge "Support bssl hash injection for libcrypto." am: febce2dfa7 am: 126db90364 am: 5daae6f2b6 am: af8948be4b
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1966148

Change-Id: I7ae6542997d1e140af1cb3f8dedbf9ce95b3d7cf
2022-02-08 19:48:06 +00:00