Android S Beta 2 (SPB2.210513.007)
bp2build/cc_toolchain: use exported clang/lld flags from Soong.

This CL removes a bunch of hardcoded flags from many moons ago, and replace them with exported flags from clang.go and global.go in Soong.

This CL also handles host/device distinctions using
target_platform_has_constraint [1] to determine if a target_platform
constraint for the android_cc_toolchain is a host or device, to load the
right flag set from the generated cc vars file.

This CL also ensures that the list of non-overridable cflags, which
currently exclude some warnings from -Wall, are always set after the
user-provided copts/cxxopts.

This will reduce the command line differences between Bazel and Soong
cpp/c compile, assemble, link actions.

https://github.com/bazelbuild/proposals/blob/master/designs/2019-11-11-target-platform-constraints.md#proposal-a-check-method-that-takes-a-constraint-value-label

Bug: 187857770
Fixes: 187857770
Test: TH
Change-Id: I120f42c94ddadd374cb97977da71943b0bf1b9e1
2 files changed
tree: 0e3df7e90ea8539bb4cec4dc22be6a34cd6eb998
  1. clang-3289846/
  2. clang-bootstrap/
  3. clang-r383902/
  4. clang-r399163b/
  5. clang-r416183b/
  6. clang-stable/
  7. llvm-binutils-stable/
  8. profiles/
  9. soong/
  10. .gitignore
  11. Android.bp
  12. Android.mk
  13. BINUTILS_KERNEL_DEPRECATION.md
  14. BUILD.bazel
  15. cc_toolchain_config.bzl
  16. clang_version.bzl
  17. CleanSpec.mk
  18. GCC_4_9_DEPRECATION.md
  19. METADATA
  20. OWNERS
  21. README.md
  22. RELEASE_NOTES.md
README.md

Android Clang/LLVM Prebuilts

For the latest version of this doc, please make sure to visit: Android Clang/LLVM Prebuilts Readme Doc

LLVM Users

Prebuilt Versions

More Information

We have a public mailing list that you can subscribe to: android-llvm@googlegroups.com

See also our release notes.