Skip to content

Commit

Permalink
exclude syscall/clang_O2:BAP
Browse files Browse the repository at this point in the history
system for compiler-dependent lift configs
  • Loading branch information
katrinafyi committed Dec 17, 2024
1 parent 33ba34c commit 306d0d8
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 7 deletions.
2 changes: 0 additions & 2 deletions src/test/compiled.md5sum

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions src/test/compiled.url.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
https://files.catbox.moe/1ar17y.zst
https://files.catbox.moe/bz0wwv.zst

# this file should have a URL as its first line
# and a sha1sum as its last line. all other
Expand All @@ -9,4 +9,4 @@ https://files.catbox.moe/1ar17y.zst
#
# make sure to update both URL and sha1sum simultaneously.

f9534fa64a116cf447f985ee14767aa1f41fe6d5 compiled.tar.zst
5103a621a9af5407b149edda077c154a8a4cbd23 compiled.tar.zst
2 changes: 0 additions & 2 deletions src/test/correct/syscall/clang_O2/syscall.md5sum
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
db97697fa77dfd2f129a15c06b9aebc7 correct/syscall/clang_O2/a.out
1d0d20d3ebe7600f619de3032febe92e correct/syscall/clang_O2/syscall.adt
f7bdf574c930ad23d6750de08179986d correct/syscall/clang_O2/syscall.bir
a086bac2a1d8e547c1cb5a7eeb69c358 correct/syscall/clang_O2/syscall.relf
f56862bf3e8ccdb223a4754b9dfe5af4 correct/syscall/clang_O2/syscall.gts
5 changes: 4 additions & 1 deletion src/test/correct/syscall/config.mk
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
ENABLED_COMPILERS = clang clang_O2 gcc gcc_O2
ENABLED_COMPILERS = clang clang_O2 gcc gcc_O2

# disable BAP for clang_O2
LIFT_ARTEFACTS_clang_O2 = $(COMMON_ARTEFACTS) $(GTIRB_ARTEFACTS)
6 changes: 6 additions & 0 deletions src/test/make/lift-directories.mk
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,18 @@

# Run from the directory basil/src/test/*/test_case/

# - lift-directories.mk: sets NAME
# - config.mk: sets ENABLED_COMPILERS
# - exec: gcc_pic.mk: sets CC / CFLAGS
# - lift.mk: sets CONFIG to compiler variant

NAME := $(notdir $(shell pwd))

COMMON_ARTEFACTS := $(NAME).relf
BAP_ARTEFACTS := $(NAME).adt $(NAME).bir
GTIRB_ARTEFACTS := $(NAME).gts

ALL_ARTEFACTS := $(BAP_ARTEFACTS) $(COMMON_ARTEFACTS) $(GTIRB_ARTEFACTS)
# - means continue if it doesnt exist
-include ./config.mk

Expand Down
10 changes: 10 additions & 0 deletions src/test/make/lift.mk
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,16 @@

MD5SUM_FILE := $(NAME).md5sum

# compilation variant name. be careful of trailing whitespace!
CONFIG := $(notdir $(realpath .))

# override with config-specific lifter selection
ifdef LIFT_ARTEFACTS_$(CONFIG)
LIFT_ARTEFACTS := $(LIFT_ARTEFACTS_$(CONFIG))
endif

# $(info $(realpath .) config=$(CONFIG) artefacts=$(LIFT_ARTEFACTS))

all: $(LIFT_ARTEFACTS)

$(NAME).relf: a.out
Expand Down

0 comments on commit 306d0d8

Please sign in to comment.