aboutsummaryrefslogtreecommitdiff
path: root/toolchains/cc/clang.BUILD
AgeCommit message (Collapse)Author
2023-10-05Add objc support to macOS toolchain.netsim-devemu-prebuiltsemu-master-devemu-35-2-releaseemu-35-1-releaseemu-35-1-devemu-34-devemu-34-3-releaseemu-34-2-releaseemu-34-2-devaosp-emu-34-devZach Yu
A minimal example is also added as a baseline test for the toolchain. Test: bazel build //build/bazel/toolchains/cc/objc_example:hello Change-Id: I2ae0597cbf4f2905f5c77856959240fe0e2018d2
2023-06-30Toolchain clean up.Zach Yu
* For gcc_lib repo, points repository root to the versioned directory and simplifies the gcc_lib.BUILD file. * Merges "hdrs" and "support_files" attributes of "cc_toolchain_import" rule. They are functionally equivelent, since "hdrs" doesn't force any header inclusion. * Rename "is_runtime_lib" to "system_provided" to align with "cc_import" rule. As a side effect, the meaning of the attribute is inverted. Test: Existing presubmit (as the change mainly affect linux builds) Change-Id: Ic0cef8e8afbe620b382a9b8dc1d6c7681fa77328
2023-06-29Read clang version from toolchains.jsonZach Yu
The bazel cc toolchain now uses the clang version defined in the canonical source of truth. A repository rule is added to convert json to starlark, loadable in BUILD files. Bug: 268674933 Change-Id: Ia96f7329e3d53edeff85219b81afa97d36eaecee
2023-06-26Add tool targets and toolchain config for Windows.Zach Yu
Bug: 288495471 Change-Id: Ic77f6e365ef058eb47a788d82916a6ff6c0868d3
2023-05-18Update clang to r487747cYi Kong
Bug: 281596081 Bug: 268674933 Test: presubmit Change-Id: Icdac214dec6ee577e3338056a9ac3ae6d8fe740b
2023-05-03Add toolchain and import libc++ for macOS.Zach Yu
Also, removed `allow_empty=False` from linux glob patterns, since they are only synced on linux. Bug: 274512969 Change-Id: Ia103cc67238cb29e7431047372ebc3becb80cb73
2023-04-07Modularize cc_tools definition.Zach Yu
Removes a hardcoded mapping of tool to cc actions, allowing a modular and flexible specification of tools and when they apply. Test: bazel test @zlib//:zlib_example64 Bug: 274512969 Change-Id: I6a1ae2958ff4e407124ab90d97e631488b16d554
2023-04-04Refactor: merge platform-independent rules into one file.Zach Yu
Test: bazel test //build/bazel/toolchains/cc/example/... Bug: 274512969 Change-Id: I775ceebbf1a7e9cdb0a807ff75aa153bd0756e3d
2023-03-01Update clang libc++ path.Zach Yu
Lib path has been moved (lib64 -> lib) and libc++ is relocated. Test: bazel test //build/bazel/toolchains/cc/example/main:hello-world_test Bug: 265864471 Change-Id: I16bac64b070633a3d4a3ad0caade4eddeceb026f
2023-02-22Update bazel toolchain clang to version r487747.Zach Yu
The original version r450784d is no longer available. As a side effect, start-up libs (crt1.o, crtbegin.o and crtend.o) are replaced with their position-independent versions (Scrt1.o, etc) as it is now enforced when compiling with "-fPIC" and "-pie" Test: bazel test //build/bazel/toolchains/cc/example/... Bug: 265864471 Change-Id: I3b1c605cf2d7fc378ef01d8d99d099d9a67bcffa
2022-11-21Replace filegroups with cc_toolchain_importZach Yu
1. cc_toolchain_config now takes a list of cc_toolchain_import instead of various filegroups 2. cc_tools has a new attribute to specify all the tool binaries 3. both rules construct and propagate DefaultInfo with all the files - so they can be used as filegroups. 4. Specify (dynamic|static)_runtime_libs for the cc_toolchain rule, so that libc++ will be correctly linked and loaded. Test: N/A Bug: 242091931 Change-Id: Idfa1fa9f42552e8eaf1c652dcbc99eb5d703d6f1
2022-09-30Enable some flag features and random seedZach Yu
Features like PIC, start-end-lib and dynamic linking of user libs need to be explicitly enabled with a flag feature. Random seed feature is added back to support anonymous namespace. Bug: 242091931 Change-Id: I3f685239397cc0ffa2eee2b41d66a6aceee4e71b
2022-09-28Add local repositories clang and gcc_libZach Yu
These repositories exports the tools / files needed by the toolchain in their BUILD files. A `selective_local_repository` rule is added to ignore the pre-existing BUILD files in the repository tree so the added BUILD files can take sole control. Bug: 242091931 Change-Id: I6ffda4731bc8ef62becd589295cbfbd009e427bd