kleaf: Add -stdlib=libc++ -static-libstdc++ to host cc_* rules.

This is to ensure host toolchain can link to libc++
to build C++ code.

For compilation, this changes C++ code only; this
has no effect on C / assembly code.

For linking, this affects object files built from
both C / assembly code and C++ code.

This does not affect Kbuild, because
feature kleaf-host-cpp-ldflags and kleaf-host-cpp-flags
are disabled for kernel_* rules.

Using -static-libstdc++ removes the complication of adding
libc++ to runfiles for cc_binary, adjusting rpath, and
packaging libc++ along with the cc_binary when it is
mentioned in a pkg_* or copy_to_dist_dir rule.

Test: TH
Bug: 324206397
Change-Id: I5893c265c4d83ae4fc261e24d5e7cefceafbebc4
Merged-In: I5893c265c4d83ae4fc261e24d5e7cefceafbebc4
1 file changed
tree: 168988bc6e3e9de21c6cb4130001d3965f720e2b
  1. clang-3289846/
  2. clang-r450784e/
  3. clang-r475365b/
  4. clang-r487747c/
  5. clang-r498229b/
  6. clang-r510928/
  7. clang-stable/
  8. docs/
  9. kleaf/
  10. llvm-binutils-stable/
  11. mlgo-models/
  12. profiles/
  13. soong/
  14. .gitignore
  15. Android.bp
  16. BINUTILS_KERNEL_DEPRECATION.md
  17. BUILD.bazel
  18. CleanSpec.mk
  19. GCC_4_9_DEPRECATION.md
  20. go.mod
  21. METADATA
  22. OWNERS
  23. README.md
  24. 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.