Merge pull request #1090 from yamt/clang
drop a few unsupported CFLAGS for clang
This commit is contained in:
@@ -454,8 +454,7 @@ jobs:
|
|||||||
TESTFLAGS="$TESTFLAGS --valgrind --context=1024 -Gdefault -Pnone" \
|
TESTFLAGS="$TESTFLAGS --valgrind --context=1024 -Gdefault -Pnone" \
|
||||||
make test
|
make test
|
||||||
|
|
||||||
# test that compilation is warning free under clang
|
# compile/run with Clang, mostly to check for Clang-specific warnings
|
||||||
# run with Clang, mostly to check for Clang-specific warnings
|
|
||||||
test-clang:
|
test-clang:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
@@ -469,12 +468,8 @@ jobs:
|
|||||||
python3 --version
|
python3 --version
|
||||||
- name: test-clang
|
- name: test-clang
|
||||||
run: |
|
run: |
|
||||||
# override CFLAGS since Clang does not support -fcallgraph-info
|
|
||||||
# and -ftrack-macro-expansions
|
|
||||||
make \
|
|
||||||
CC=clang \
|
CC=clang \
|
||||||
CFLAGS="$CFLAGS -MMD -g3 -I. -std=c99 -Wall -Wextra -pedantic" \
|
make test
|
||||||
test
|
|
||||||
|
|
||||||
# run benchmarks
|
# run benchmarks
|
||||||
#
|
#
|
||||||
|
|||||||
@@ -18,6 +18,12 @@ VALGRIND ?= valgrind
|
|||||||
GDB ?= gdb
|
GDB ?= gdb
|
||||||
PERF ?= perf
|
PERF ?= perf
|
||||||
|
|
||||||
|
# guess clang or gcc (clang sometimes masquerades as gcc because of
|
||||||
|
# course it does)
|
||||||
|
ifneq ($(shell $(CC) --version | grep clang),)
|
||||||
|
NO_GCC = 1
|
||||||
|
endif
|
||||||
|
|
||||||
SRC ?= $(filter-out $(wildcard *.t.* *.b.*),$(wildcard *.c))
|
SRC ?= $(filter-out $(wildcard *.t.* *.b.*),$(wildcard *.c))
|
||||||
OBJ := $(SRC:%.c=$(BUILDDIR)/%.o)
|
OBJ := $(SRC:%.c=$(BUILDDIR)/%.o)
|
||||||
DEP := $(SRC:%.c=$(BUILDDIR)/%.d)
|
DEP := $(SRC:%.c=$(BUILDDIR)/%.d)
|
||||||
@@ -59,12 +65,15 @@ BENCH_PERF := $(BENCH_RUNNER:%=%.perf)
|
|||||||
BENCH_TRACE := $(BENCH_RUNNER:%=%.trace)
|
BENCH_TRACE := $(BENCH_RUNNER:%=%.trace)
|
||||||
BENCH_CSV := $(BENCH_RUNNER:%=%.csv)
|
BENCH_CSV := $(BENCH_RUNNER:%=%.csv)
|
||||||
|
|
||||||
CFLAGS += -fcallgraph-info=su
|
|
||||||
CFLAGS += -g3
|
CFLAGS += -g3
|
||||||
CFLAGS += -I.
|
CFLAGS += -I.
|
||||||
CFLAGS += -std=c99 -Wall -Wextra -pedantic
|
CFLAGS += -std=c99 -Wall -Wextra -pedantic
|
||||||
CFLAGS += -Wmissing-prototypes
|
CFLAGS += -Wmissing-prototypes
|
||||||
|
ifndef NO_GCC
|
||||||
|
CFLAGS += -fcallgraph-info=su
|
||||||
CFLAGS += -ftrack-macro-expansion=0
|
CFLAGS += -ftrack-macro-expansion=0
|
||||||
|
endif
|
||||||
|
|
||||||
ifdef DEBUG
|
ifdef DEBUG
|
||||||
CFLAGS += -O0
|
CFLAGS += -O0
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user