Skip to content

Commit

Permalink
[FLINK-35575] Disable PERF_CONTEXT by default in compilation (#76)
Browse files Browse the repository at this point in the history
  • Loading branch information
mayuehappy authored Aug 13, 2024
1 parent 3e4e540 commit 7a76723
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
5 changes: 3 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ commands:
echo "export SNAPPY_DOWNLOAD_BASE=https://rocksdb-deps.s3.us-west-2.amazonaws.com/pkgs/snappy" >> $BASH_ENV
echo "export LZ4_DOWNLOAD_BASE=https://rocksdb-deps.s3.us-west-2.amazonaws.com/pkgs/lz4" >> $BASH_ENV
echo "export ZSTD_DOWNLOAD_BASE=https://rocksdb-deps.s3.us-west-2.amazonaws.com/pkgs/zstd" >> $BASH_ENV
echo "export DISABLE_PERF_CONTEXT=0" >> $BASH_ENV
windows-build-steps:
steps:
Expand Down Expand Up @@ -361,7 +362,7 @@ jobs:
resource_class: xlarge
steps:
- checkout # check out the code in the project directory
- run: CC=clang CXX=clang++ USE_CLANG=1 PORTABLE=1 make V=1 -j16 all
- run: CC=clang CXX=clang++ USE_CLANG=1 PORTABLE=1 DISABLE_PERF_CONTEXT=0 make V=1 -j16 all
- post-steps

build-linux-clang10-asan:
Expand Down Expand Up @@ -474,7 +475,7 @@ jobs:
- run: apt-get update -y && apt-get install -y libgflags-dev
- run:
name: "Unity build"
command: make V=1 -j8 unity_test
command: DISABLE_PERF_CONTEXT=0 make V=1 -j8 unity_test
no_output_timeout: 20m
- run: make V=1 -j8 -k check-headers # could be moved to a different build
- post-steps
Expand Down
6 changes: 6 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -429,6 +429,12 @@ ifndef DISABLE_JEMALLOC
PLATFORM_CCFLAGS += $(JEMALLOC_INCLUDE)
endif

DISABLE_PERF_CONTEXT ?= 1
ifeq ($(DISABLE_PERF_CONTEXT),1)
PLATFORM_CXXFLAGS += -DNPERF_CONTEXT
PLATFORM_CCFLAGS += -DNPERF_CONTEXT
endif

ifndef USE_FOLLY
USE_FOLLY=0
endif
Expand Down

0 comments on commit 7a76723

Please sign in to comment.