forked from open-telemetry/opentelemetry-cpp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.bazelrc
152 lines (119 loc) · 6.95 KB
/
.bazelrc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
# Copyright The OpenTelemetry Authors
# SPDX-License-Identifier: Apache-2.0
# Track changes in folders referenced by copy_directory
startup --host_jvm_args=-DBAZEL_TRACK_SOURCE_DIRECTORIES=1
build --features=parse_headers
#build --features=layering_check
# Don't try to build .so and .dylib shared libs (instead of static) libs on Linux/OSX
# For some reason, with clang-cl, it also tried to do on Windows, where dynamic linking just does not support it.
build --dynamic_mode=off
common --remote_download_minimal
# Avoid using c:\windows\system32\bash.exe
common:windows --shell_executable="c:\\program files\\git\\usr\\bin\\bash.exe"
# Enable automatic configs based on platform
common --enable_platform_specific_config
common --enable_runfiles
build --build_tag_filters=-jaeger,-opentracing,-opentracing_shim
test --test_tag_filters=-jaeger,-opentracing,-opentracing_shim
build --experimental_convenience_symlinks=clean
build:windows --copt="/Brepro" --copt="/guard:cf" --copt="/guard:ehcont" --copt="/Z7" --copt="/JMC-" --copt="/sdl"
build:windows --linkopt="/Brepro" --linkopt="/guard:cf" --linkopt="/guard:ehcont" --linkopt="/DEBUG:FULL" --linkopt="/CETCOMPAT" --linkopt="/SWAPRUN:NET,CD" --linkopt="/OPT:REF,ICF" --linkopt="/RELEASE" --linkopt="/DEBUGTYPE:CV,PDATA,FIXUP"
build:windows --copt="/Zc:strictStrings"
build:windows --host_linkopt="shell32.lib"
# Requires Visual Studio 2019 Build Tools installed in default location with the latest compiler (14.29.30133) for x64
build:windows --action_env=BAZEL_VC_FULL_VERSION=14.29.30133 --action_env=BAZEL_WINSDK_FULL_VERSION=10.0.22621.0
build:windows --host_action_env=BAZEL_VC_FULL_VERSION=14.29.30133 --host_action_env=BAZEL_WINSDK_FULL_VERSION=10.0.22621.0
# Set minimum supported C++ version
build:macos --host_cxxopt=-std=c++17 --cxxopt=-std=c++17
build:linux --host_cxxopt=-std=c++17 --cxxopt=-std=c++17
build:windows --host_cxxopt=/std:c++17 --cxxopt=/std:c++17
build:linux --copt=-DCIVETWEB_API= --copt=-DCIVETWEB_CXX_API= --cxxopt=-DCIVETWEB_API= --cxxopt=-DCIVETWEB_CXX_API=
build:linux --cxxopt=-fvisibility=hidden --copt=-fvisibility=hidden
#build:linux --fission=yes --copt=-g
build:linux --copt=-g --strip=never
build:linux --action_env=CC=/usr/bin/clang-19
build:linux --host_action_env=CC=/usr/bin/clang-19
build:macos --copt=-DCIVETWEB_API= --copt=-DCIVETWEB_CXX_API= --cxxopt=-DCIVETWEB_API= --cxxopt=-DCIVETWEB_CXX_API=
build:macos --cxxopt=-fvisibility=hidden --copt=-fvisibility=hidden
build:macos --strip=never --copt=-g --cxxopt=-g
# Does not yet compoile with the Developer command-line tools, needs clang from homebrew
#build:macos --action_env=/Library/Developer/CommandLineTools/usr/bin/clang
#build:macos --host_action_env=/Library/Developer/CommandLineTools/usr/bin/clang
build:macos --action_env=CC=/opt/homebrew/bin/clang
build:macos --host_action_env=CC=/opt/homebrew/bin/clang
build:macos --apple_generate_dsym --output_groups=+dsyms
# --config=asan : Address Sanitizer.
common:asan --copt -DADDRESS_SANITIZER
common:asan --copt -fsanitize=address,bool,float-cast-overflow,integer-divide-by-zero,null,return,returns-nonnull-attribute,shift-exponent,signed-integer-overflow,unreachable,vla-bound
common:asan --copt -fsanitize-address-use-after-scope
common:asan --copt -fno-sanitize-recover=all
common:asan --linkopt -fsanitize=address,bool,float-cast-overflow,integer-divide-by-zero,null,return,returns-nonnull-attribute,shift-exponent,signed-integer-overflow,unreachable,vla-bound
common:asan --linkopt -fsanitize-address-use-after-scope
common:asan --linkopt -fno-sanitize-recover=all
common:asan --cc_output_directory_tag=asan
# --config=tsan : Thread Sanitizer.
common:tsan --copt -fsanitize=thread
common:tsan --copt -DTHREAD_SANITIZER
common:tsan --linkopt -fsanitize=thread
common:tsan --cc_output_directory_tag=tsan
# This is needed to address false positive problem with abseil.The same setting as gRPC
# https://github.com/google/sanitizers/issues/953
common:tsan --test_env=TSAN_OPTIONS=report_atomic_races=0
test --test_size_filters=small,medium,large,enormous
test --test_timeout_filters=short,moderate,long,eternal
test --test_verbose_timeout_warnings
test --test_summary=terse
mod --charset=ascii
# This doesn't work with
# ../com_github_opentelemetry_proto/opentelemetry/proto/collector/metrics/v1/metrics_service.proto: File does not reside within any path specified using --proto_path (or -I). You must specify a --proto_path which encompasses this file. Note that the proto_path must be a
#common --experimental_sibling_repository_layout
common --nobuild_runfile_links
startup --windows_enable_symlinks
# common --incompatible_disable_starlark_host_transitions
# common --incompatible_disable_target_default_provider_fields
# common --incompatible_no_rule_outputs_param
# common --incompatible_stop_exporting_language_modules
common --experimental_disable_external_package
common --experimental_platforms_api
common --experimental_repository_cache_hardlinks
common --incompatible_auto_exec_groups
common --incompatible_config_setting_private_default_visibility
common --incompatible_disable_native_repo_rules
common --incompatible_disable_non_executable_java_binary
common --incompatible_disable_target_provider_fields
common --incompatible_disallow_struct_provider_syntax
common --incompatible_enable_proto_toolchain_resolution
common --incompatible_fail_on_unknown_attributes
common --incompatible_merge_fixed_and_default_shell_env
common --incompatible_no_implicit_file_export
common --incompatible_strict_action_env
common --incompatible_top_level_aspects_require_providers
common --incompatible_use_cc_configure_from_rules_cc
common --incompatible_modify_execution_info_additive
common --modify_execution_info=CppCompile=+supports-path-mapping
common --skip_incompatible_explicit_targets
build --@curl//:use_mbedtls=true
# build --@curl//:http_only=true
# build --experimental_save_feature_state
# saves .s and .ii files but tends to be super slow
# build --save_temps
mod --lockfile_mode=refresh
# Select clang-cl to be the default compiler on Windows
build:windows --config=clang-cl
# See MODULE.bazel where we've disabled the platform/toolchain setup, but made it back here
build:clang-cl --host_platform=@otel_sdk//:x64_windows-clang-cl
build:clang-cl --extra_toolchains=@local_config_cc//:cc-toolchain-x64_windows-clang-cl
build:clang-cl --per_file_copt="protobuf\\+/.*@-Wno-invalid-offsetof"
build:clang-cl --host_per_file_copt="protobuf\\+/.*@-Wno-invalid-offsetof"
build:clang-cl --per_file_copt="c-ares\\+/.*@-Wno-macro-redefined"
build:clang-cl --host_per_file_copt="c-ares\\+/.*@-Wno-macro-redefined"
common --experimental_enable_android_migration_apis
common:linux --force_pic
common:macos --force_pic
startup --client_debug
common --flag_alias=dll=@otel_sdk//:with_dll
## This is what my ../top.bazelrc contains (not in the repo as local to my machine)
# build --disk_cache=f:/b/d
# common --repository_cache=f:/b/r
# startup --output_user_root=f:/b/u
try-import %workspace%/../top.bazelrc