Skip to content

Commit

Permalink
Syncing configuration files from Nighthawk and Envoy (04/24/2024) (#288)
Browse files Browse the repository at this point in the history
Signed-off-by: Xin Huang <[email protected]>
  • Loading branch information
gyohuangxin authored Apr 24, 2024
1 parent ffa8ccd commit 5b742f8
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 9 deletions.
27 changes: 20 additions & 7 deletions .bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -97,15 +97,19 @@ build:sanitizer --linkopt -ldl

# Common flags for Clang
build:clang --action_env=BAZEL_COMPILER=clang
build:clang --action_env=CC=clang --action_env=CXX=clang++
build:clang --linkopt=-fuse-ld=lld
build:clang --action_env=CC=clang --host_action_env=CC=clang
build:clang --action_env=CXX=clang++ --host_action_env=CXX=clang++

# Flags for Clang + PCH
build:clang-pch --spawn_strategy=local
build:clang-pch --define=ENVOY_CLANG_PCH=1

# Use gold linker for gcc compiler.
build:gcc --linkopt=-fuse-ld=gold
build:gcc --test_env=HEAPCHECK=
build:gcc --action_env=BAZEL_COMPILER=gcc
build:gcc --action_env=CC=gcc --action_env=CXX=g++

# Clang-tidy
# TODO(phlax): enable this, its throwing some errors as well as finding more issues
Expand All @@ -116,7 +120,6 @@ build:clang-tidy --output_groups=report
build:clang-tidy --build_tag_filters=-notidy

# Basic ASAN/UBSAN that works for gcc
build:asan --action_env=ENVOY_ASAN=1
build:asan --config=sanitizer
# ASAN install its signal handler, disable ours so the stacktrace will be printed by ASAN
build:asan --define signal_trace=disabled
Expand All @@ -141,11 +144,19 @@ build:asan --copt -O1
build:asan --copt -fno-optimize-sibling-calls

# Clang ASAN/UBSAN
build:clang-asan --config=clang
build:clang-asan --config=asan
build:clang-asan --linkopt -fuse-ld=lld
build:clang-asan --linkopt --rtlib=compiler-rt
build:clang-asan --linkopt --unwindlib=libgcc
build:clang-asan-common --config=clang
build:clang-asan-common --config=asan
build:clang-asan-common --linkopt -fuse-ld=lld
build:clang-asan-common --linkopt --rtlib=compiler-rt
build:clang-asan-common --linkopt --unwindlib=libgcc

build:clang-asan --config=clang-asan-common
build:clang-asan --linkopt='-L/opt/llvm/lib/clang/14.0.0/lib/x86_64-unknown-linux-gnu' # unique
build:clang-asan --linkopt=-l:libclang_rt.ubsan_standalone.a
build:clang-asan --linkopt=-l:libclang_rt.ubsan_standalone_cxx.a
build:clang-asan --action_env=ENVOY_UBSAN_VPTR=1
build:clang-asan --copt=-fsanitize=vptr,function
build:clang-asan --linkopt=-fsanitize=vptr,function

# macOS
build:macos --cxxopt=-std=c++20 --host_cxxopt=-std=c++20
Expand Down Expand Up @@ -206,6 +217,7 @@ build:libc++ --action_env=BAZEL_CXXOPTS=-stdlib=libc++
build:libc++ --action_env=BAZEL_LINKLIBS=-l%:libc++.a:-l%:libc++abi.a
build:libc++ --action_env=BAZEL_LINKOPTS=-lm:-pthread
build:libc++ --define force_libcpp=enabled
build:clang-libc++ --config=libc++

build:libc++20 --config=libc++
# gRPC has a lot of deprecated-enum-enum-conversion warning. Remove once it is addressed
Expand Down Expand Up @@ -331,6 +343,7 @@ build:remote-clang-libc++ --config=remote
build:remote-clang-libc++ --config=rbe-toolchain-clang-libc++

build:remote-gcc --config=remote
build:remote-gcc --config=gcc
build:remote-gcc --config=rbe-toolchain-gcc

build:remote-asan --config=remote
Expand Down
2 changes: 1 addition & 1 deletion ci/envoy_build_sha.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash


ENVOY_BUILD_CONTAINER="$(grep envoyproxy/envoy-build-ubuntu "$(dirname "$0")"/../.bazelrc | sed -e 's#.*envoyproxy/envoy-build-ubuntu:\(.*\)#\1#' | uniq)"
Expand Down
2 changes: 1 addition & 1 deletion ci/run_envoy_docker.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

set -e

Expand Down

0 comments on commit 5b742f8

Please sign in to comment.