Lines Matching +full:clang +full:- +full:build

3 # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
11 # https://github.com/llvm/llvm-project/issues/55924
12 common --enable_bzlmod=false --enable_workspace
15 common --legacy_external_runfiles
17 # Prevent invalid caching if input files are modified during a build.
18 build --experimental_guard_against_concurrent_changes
20 # Automatically enable --config=(linux|macos|windows) based on the host
21 build --enable_platform_specific_config
23 # In opt mode, bazel by default builds both PIC and non-PIC object files for
28 build:linux --force_pic
29 build:windows --force_pic
33 build --dynamic_mode=off
37 build --strip=never
40 build --features=layering_check
44 # See: https://bazel.build/reference/be/functions#exports_files
45 build --incompatible_no_implicit_file_export
49 common --incompatible_disallow_empty_glob
52 build --experimental_cc_shared_library
55 # situations Do not build runfile trees by default. If an execution strategy
56 # relies on runfile symlink tree, the tree is created on-demand. See:
59 build --build_runfile_links=false
66 build:zlib_external --repo_env=BAZEL_LLVM_ZLIB_STRATEGY=external
67 build:zlib_system --repo_env=BAZEL_LLVM_ZLIB_STRATEGY=system
71 # builds using a Clang-based compiler, and default to the `clang` executable on
77 # Set the default compiler to the `clang` binary on the `PATH`.
78 build:generic_clang --repo_env=CC=clang
81 build:generic_clang --cxxopt=-std=c++17 --host_cxxopt=-std=c++17
83 # Use `-Wall` for Clang.
84 build:generic_clang --copt=-Wall --host_copt=-Wall
86 # The Clang available on MacOS has a warning that isn't clean on MLIR code. The
88 build:generic_clang --cxxopt=-Wno-range-loop-analysis --host_cxxopt=-Wno-range-loop-analysis
90 # Build errors are not a helpful way to enforce deprecation in-repo and it is
91 # not the point of the Bazel build to catch usage of deprecated APIs.
92 build:generic_clang --copt=-Wno-deprecated --host_copt=-Wno-deprecated
94 # lld links faster than other linkers. Assume that anybody using clang also has
96 build:generic_clang --linkopt=-fuse-ld=lld --host_linkopt=-fuse-ld=lld
100 # builds using a GCC-based compiler, and default to the `gcc` executable on
107 build:generic_gcc --repo_env=CC=gcc
110 build:generic_gcc --cxxopt=-std=c++17 --host_cxxopt=-std=c++17
112 # Build errors are not a helpful way to enforce deprecation in-repo and it is
113 # not the point of the Bazel build to catch usage of deprecated APIs.
114 build:generic_gcc --copt=-Wno-deprecated --host_copt=-Wno-deprecated
118 build:generic_gcc --copt=-Wno-unused-parameter --host_copt=-Wno-unused-parameter
119 build:generic_gcc --copt=-Wno-comment --host_copt=-Wno-comment
120 build:generic_gcc --cxxopt=-Wno-class-memaccess --host_cxxopt=-Wno-class-memaccess
121 build:generic_gcc --copt=-Wno-maybe-uninitialized --host_copt=-Wno-maybe-uninitialized
122 build:generic_gcc --copt=-Wno-misleading-indentation --host_copt=-Wno-misleading-indentation
125 # Generic Windows flags common to both MSVC and Clang.
129 build:windows --cxxopt=/std:c++17 --host_cxxopt=/std:c++17
132 build:windows --copt=/Zc:strictStrings --host_copt=/Zc:strictStrings
133 build:windows --copt=/Oi --host_copt=/Oi
134 build:windows --cxxopt=/Zc:rvalueCast --host_cxxopt=/Zc:rvalueCast
137 build:windows --cxxopt=/bigobj --host_cxxopt=/bigobj
143 build:msvc --config=windows
145 build:msvc --copt=/WX --host_copt=/WX # Treat warnings as errors...
147 build:msvc --copt=/wd4141 --host_copt=/wd4141 # inline used more than once
148 build:msvc --copt=/wd4244 --host_copt=/wd4244 # conversion type -> type
149 build:msvc --copt=/wd4267 --host_copt=/wd4267 # conversion size_t -> type
150 build:msvc --copt=/wd4273 --host_copt=/wd4273 # multiple definitions with different dllimport
151 build:msvc --copt=/wd4319 --host_copt=/wd4319 # zero-extending after complement
152 build:msvc --copt=/wd4624 --host_copt=/wd4624 # destructor was implicitly defined as deleted
153 build:msvc --copt=/wd4804 --host_copt=/wd4804 # comparisons between bool and int
154 build:msvc --copt=/wd4805 --host_copt=/wd4805 # comparisons between bool and int
156 build:msvc --linkopt=/WX --host_linkopt=/WX # Treat warnings as errors...
158 build:msvc --linkopt=/IGNORE:4001 --host_linkopt=/IGNORE:4001 # no object files
161 # Options for Windows `clang-cl` builds.
164 # We just start with the baseline Windows config as `clang-cl` doesn't accept
165 # some of the generic Clang flags.
166 build:clang-cl --config=windows
168 # Switch from MSVC to the `clang-cl` compiler.
169 build:clang-cl --compiler=clang-cl
171 # Use Clang's internal warning flags instead of the ones that sometimes map
173 build:clang-cl --copt=/clang:-Wall --host_copt=/clang:-Wall
174 build:clang-cl --copt=/clang:-Werror --host_copt=/clang:-Werror
177 build:clang-cl --copt=/clang:-Wno-unused --host_copt=/clang:-Wno-unused
180 build:clang-cl --copt=/clang:-Wno-unused-const-variable --host_copt=/clang:-Wno-unused-const-variable
182 # Disable some warnings hit even with `clang-cl` in Clang's own code.
183 build:clang-cl --copt=/clang:-Wno-inconsistent-dllimport --host_copt=/clang:-Wno-inconsistent-dllimport
184 build:clang-cl --cxxopt=/clang:-Wno-c++11-narrowing --host_cxxopt=/clang:-Wno-c++11-narrowing
190 # -O1 tries to provide a reasonable tradeoff between compile times and runtime
192 # check-clang) we may want more optimizations.
193 # Note for anybody considering using --compilation_mode=opt in CI, it builds
195 # non-PIC version for binaries.
196 build:ci --copt=-O1
198 # Use clang.
199 build:ci --config=generic_clang
202 build:ci --sandbox_base=/dev/shm
206 build:ci --@llvm-project//libc:mpfr=system
207 build:ci --@llvm-project//llvm:pfm=system
209 # Don't build/test targets tagged with "nobuildkite".
210 build:ci --build_tag_filters=-nobuildkite
211 build:ci --test_tag_filters=-nobuildkite
214 build:ci --keep_going
217 build:ci --test_output=errors
220 build:ci --test_summary=terse
224 build:ci --remote_default_exec_properties=cache-silo-key=CleverPeafowl
230 try-import %workspace%/user.bazelrc