Fix centipede compilation (#9613)

1. Don't use trace-loads as it is not fully supported in LLVM and breaks
many projects (see
9383870160)
2. Use -Wl for link time options so they aren't unnecessarily used (also
fixes meson based projects).
This commit is contained in:
jonathanmetzman 2023-02-06 22:33:23 -05:00 committed by GitHub
parent 9bbc9ad236
commit a75aab95ec
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 4 deletions

View File

@ -25,11 +25,10 @@ fi
cp "$BIN_DIR/libcentipede_runner.pic.a" "$LIB_FUZZING_ENGINE"
export DFTRACING_FLAGS='-fsanitize-coverage=trace-loads'
export CENTIPEDE_FLAGS=`cat "$SRC/centipede/clang-flags.txt" | tr '\n' ' '`
export LIBRARIES_FLAGS="-Wno-unused-command-line-argument -ldl -lrt -lpthread $SRC/centipede/weak.o"
export LIBRARIES_FLAGS="-Wno-unused-command-line-argument -Wl,-ldl -Wl,-lrt -Wl,-lpthread -Wl,$SRC/centipede/weak.o"
export CFLAGS="$CFLAGS $DFTRACING_FLAGS $CENTIPEDE_FLAGS $LIBRARIES_FLAGS"
export CXXFLAGS="$CXXFLAGS $DFTRACING_FLAGS $CENTIPEDE_FLAGS $LIBRARIES_FLAGS"
export CFLAGS="$CFLAGS $CENTIPEDE_FLAGS $LIBRARIES_FLAGS"
export CXXFLAGS="$CXXFLAGS $CENTIPEDE_FLAGS $LIBRARIES_FLAGS"
echo 'done.'