Commit graph

6577 commits

Author SHA1 Message Date
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
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
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
Treehugger Robot
104ecf6708 Merge "Add error message for unsupported x86 arch variant" 2022-02-11 13:55:43 +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
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
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
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
9deb87e8e2 Merge "Escape cc ldflags in bp2build conversion" 2022-02-09 23:05:01 +00:00
Pirama Arumuga Nainar
111817435a Merge "Switch to clang-r445002" 2022-02-09 18:55:08 +00:00
Treehugger Robot
5974423b06 Merge "Add package for printing starlark formatted data" 2022-02-09 04:48:33 +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
3e7f5c411d Merge "Use -fno-sanitize-link-runtime for bionic sanitizers" 2022-02-08 20:33:43 +00:00
Yu Liu
febce2dfa7 Merge "Support bssl hash injection for libcrypto." 2022-02-08 16:59:34 +00:00
Treehugger Robot
cf637f101c Merge "Disable tidy default DeprecatedOrUnsafeBufferHandling check" 2022-02-08 03:30:31 +00:00
Colin Cross
234b01de96 Use -fno-sanitize-link-runtime for bionic sanitizers
Currently when using sanitizers and building for the device
the -fsanitize= argument is not passed to the linker so that the
linker won't add the runtimes, which have already been added
as explicit dependencies.  Pass -fno-sanitize-link-runtime instead
in case the linker has other behaviors when passed -fsanitize=
besides adding the runtimes.  Also check for bionic instead of host
so that linux bionic gets the same linker behavior as bionic for
the device.

Test: m USE_HOST_MUSL=true host-native
Test: m checkbuild
Change-Id: I0f2966e2fd4ae8adc5cb21eb116c349bcc0c668f
2022-02-08 01:35:23 +00:00
Jooyung Han
472be14f26 Merge changes I11693286,I8d79a434
* changes:
  VNDK libs use "unique" APEX variants
  use_vndk_as_stable APEX shouldn't include VNDK lib
2022-02-08 01:03:41 +00:00
Chih-Hung Hsieh
9bcce2ef3a Disable tidy default DeprecatedOrUnsafeBufferHandling check
This will suppress warning like:
system/chre/chpp/app.c:637:3: warning: Call to function 'memset' is insecure
as it does not provide security checks introduced in the C11 standard.
Replace with analogous functions that support length arguments or provides
boundary checks such as 'memset_s' in case of C11
[clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]

Test: WITH_TIDY=1 CLANG_ANALYZER_CHECKS=1 make tidy-system-chre-chpp_subset
Change-Id: I87a7bba31aa10260fc408317a8cd54bf80c03152
2022-02-07 16:44:13 -08:00
Yu Liu
75be7b94d6 Support bssl hash injection for libcrypto.
Bug: 215541108
Test: Build libcrypto with Bazel and verify the hash injected, add unit
test
Change-Id: I0375307aab0b1e60a8be298d680e1e0af1ebb454

Change-Id: I9133ce398e2024fe7834a292bf2f5ba3222d630b
2022-02-07 14:15:42 -08:00
Treehugger Robot
c01e074fef Merge "Update error messages for failed globs." 2022-02-07 17:24:23 +00:00
Elliott Hughes
b039496446 Merge "Disable BTI for now." 2022-02-07 17:02:56 +00:00
Liz Kammer
0ea7998208 Update error messages for failed globs.
Currently error messages appear like:
&fs.PathError{Op:"open", Path:"..." Err:0x18}
which make them difficult to parse.

Test: CI
Change-Id: I18da18abc43230d0ea37d166179d07e585077f51
2022-02-07 08:56:47 -05:00
Chih-Hung Hsieh
63d59eb77c Use only single dash for tidy flags
* Work around RBE preprocessor bug, which rejects double dash flags.

Bug: 217778010
Test: make tidy-soong_subset
Change-Id: Ic7c0a95ae7afefb49cc9d124fd3c9f38fe2e0f56
2022-02-04 20:34:27 -08:00
Treehugger Robot
56fc48c482 Merge "Remove unnecessary --warn-shared-textrel flags." 2022-02-04 23:58:41 +00:00
Liz Kammer
f38a8379ff Escape cc ldflags in bp2build conversion
Bug: 217757720
Test: bp2build.sh
Change-Id: I704acfb01527f15ff762afeaaf4e0e328e4737d8
2022-02-04 15:43:08 -05:00
Sam Delmerico
75664acd70 Merge "add target_compatible_with stanza for host targets" 2022-02-04 19:15:04 +00:00
Stephen Hines
a66590a98d Remove unnecessary --warn-shared-textrel flags.
This flag has never done anything for ld.lld, since it has this behavior
by default (and actually can't turn it off either). It's now being
removed as a valid flag from ld.lld, so it's time for Android to drop
the unnecessary flags. See https://reviews.llvm.org/D118942.

Test: builds
Change-Id: I22c344b7a55e275c1fbd5fef25f85e97a39de5c4
2022-02-04 11:02:17 -08:00
Liz Kammer
cc1a2062f0 Merge "Allowlist additional com.android.runtime blockers" 2022-02-04 14:17:32 +00:00
Chih-Hung Hsieh
9df9dd4d13 Disable gnu-designator warnings.
Bug: 217613071
Test: make
Change-Id: I51a6afdf6d4b1549d2e3b65168c3cce52d8e197d
2022-02-04 00:30:20 -08:00
Jooyung Han
91f9203af4 VNDK libs use "unique" APEX variants
In case there are two vendor apexes(one with "use_vndk_as_stable:true",
and the other with "use_vndk_as_stable:false") a VNDK lib used by both
will have "APEX" variant and the former APEX will use "apex" variation.

For example,

 apex1(use_vndk_as_stable) -> foo -> libvndk
 apex2 -> bar -> libvndk

Since foo, bar and libvndk are mutated into two APEX variations("",
"apex10000"), foo will use the apex variation of libvndk.

To fix this, VNDK libs can use "unique" APEX variations. Then, in the
above example, foo will have "myapex1" variation and libvndk will have
two APEX variations("" and "apex2"). So foo will link to ""(non-APEX)
variation as fallback.

Bug: 216847402
Test: m nothing (soong tests)
Change-Id: I116932860ef79e22dc338a58b251e3ca693ab4f3
2022-02-04 13:07:14 +09:00
Pirama Arumuga Nainar
d950ab8bb3 Switch to clang-r445002
- Disable -Wbitwise-instead-of-logical for external projects.

Test: N/A
Change-Id: Icb081bf6f17fcd5bf9759efa99fd26413c74f7c3
2022-02-03 13:42:13 -08:00
Sam Delmerico
75539d62ae add target_compatible_with stanza for host targets
Soong modules that are specific for the host platform (e.g.
java_library_host, cc_binary_host, java_genrule_host, etc.) should
not be built on the target platform (Android), so we add a
target_compatible_with attribute to skip this type of module on an
Android target build.

Bug: 215229742
Test: go test ./bp2build
Change-Id: Ifb76ef4e0dc4cb3adb6a64b5c375ce36f7973e48
2022-02-03 19:25:12 +00:00
Liz Kammer
35ca77edb6 Allowlist additional com.android.runtime blockers
To unblock mixed builds, uses a common mechanism to determine cc module
type across bp2build and mixed builds.

Test: mixed_droid.sh
Change-Id: I1f69ad0858cda549b7c95dbadd596e46df0f23b2
2022-02-03 11:17:05 -05:00
Elliott Hughes
c75994d623 Disable BTI for now.
Bug: https://issuetracker.google.com/216395195
Test: readelf -aW libc.so | grep PROPERTY
Change-Id: I4d157cbe5bf5b54cb7d3c4efe8fb74d4f72af6f3
2022-02-02 14:45:41 -08:00
Usta Shrestha
e6b43abd62 redundant statement
Test: m nothing
Bug: n/a
Change-Id: Ida33234b5cf6d915a2d136d8bc0aa6684bfd33c0
2022-01-29 06:37:10 +00:00
Treehugger Robot
cd22b62add Merge "Revert "Reland "Enable hwasan use after scope detection.""" 2022-01-27 22:54:24 +00:00
Pirama Arumuga Nainar
0d7d3e1647 [cc] Add per-file OWNERS for cc/coverage.go
Test: N/A
Change-Id: I728208ed9ef10e032fd12e495ba67121e4c849e5
2022-01-27 10:49:13 -08:00
Pirama Arumuga Nainar
f776c8c47c [cc/coverage] Override/disable -Wframe-larger-than
We can expect frame size increase with coverage instrumentation.

Test: N/A
Change-Id: Ifdb50809c83939ded5a26804aa0ae9404eb1a107
2022-01-27 10:47:55 -08:00
Liz Kammer
2b376bca00 Create subdir for cc rules.
Test: mixed_libc.sh
Change-Id: I7f43f283f40ad6236dcedfccae175a007ea252d2
2022-01-27 11:16:34 -05:00
Yi Kong
a86875eefb Merge "Add tests for afdo.go" 2022-01-27 04:27:28 +00:00
Florian Mayer
fd337b3963 Revert "Reland "Enable hwasan use after scope detection.""
This reverts commit 0edaddf2ce.

Reason for revert: b/http://b/214007768

Change-Id: I60a2e3a5386601992fcb5632c142dd28bdb611b2
2022-01-27 03:31:28 +00:00
Treehugger Robot
2d305010af Merge "[cc/tidy] Disable cert-err33-c" 2022-01-26 10:34:58 +00:00
Yi Kong
d5954a2a92 Add tests for afdo.go
Bug: 79161490
Test: presubmit
Change-Id: I686b5226aad5011ab30a0a105f8c7866cd610502
2022-01-26 17:46:33 +08:00
Yi Kong
3440d0d474 Merge "Sampling PGO deprecation" 2022-01-26 05:43:42 +00:00
Treehugger Robot
f73658bdc6 Merge "[NFCI] Change llvm-ar '-format' to be '--format'." 2022-01-26 00:53:36 +00:00