Skip to content

Commit

Permalink
ci: add condition limit back and search for a threshold (64)
Browse files Browse the repository at this point in the history
Note this is experimental and docs are not updated synchronously
  • Loading branch information
whentojump committed Jul 2, 2024
1 parent 3f2759e commit e93fd02
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion ci/2_pull_source.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,28 @@ git clone https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git --bra

# Use the snapshot of LLVM on June 11 2024
cd $MCDC_HOME/llvm-project
git checkout f5dcfb9968a3
# git checkout f5dcfb9968a3

# Apply kernel patches
cd $MCDC_HOME/linux
git apply $MCDC_HOME/linux-mcdc/patches/v0.5/0001-clang_instr_profile-add-Clang-s-Source-based-Code-Co.patch
git apply $MCDC_HOME/linux-mcdc/patches/v0.5/0002-kbuild-clang_instr_profile-disable-instrumentation-i.patch
git apply $MCDC_HOME/linux-mcdc/patches/v0.5/0003-clang_instr_profile-add-Clang-s-MC-DC-support.patch
git apply $MCDC_HOME/linux-mcdc/patches/v0.5/0004-kbuild-clang_instr_profile-disable-instrumentation-i.patch

cat << EOF > /tmp/revert_condition_limit.diff
diff --git a/Makefile b/Makefile
index 1c4e329fa..bfcb36562 100644
--- a/Makefile
+++ b/Makefile
@@ -688,7 +688,7 @@ all: vmlinux
CFLAGS_SCC_CLANG := -fprofile-instr-generate -fcoverage-mapping
export CFLAGS_SCC_CLANG
-CFLAGS_MCDC_CLANG := -fcoverage-mcdc
+CFLAGS_MCDC_CLANG := -fcoverage-mcdc -Xclang -fmcdc-max-conditions=64
export CFLAGS_MCDC_CLANG
CFLAGS_GCOV := -fprofile-arcs -ftest-coverage
EOF
git apply /tmp/revert_condition_limit.diff

0 comments on commit e93fd02

Please sign in to comment.