Skip to content

Commit

Permalink
fuzz-introspector: remove use of LDFLAGS (google#7573)
Browse files Browse the repository at this point in the history
* fuzz-introspector: remove use of LDFLAGS

The use of LDFLAGS does not really follow the policy of OSS-Fuzz. This
moves the linker flags into the sanitizer flags.

Ref:
google#7540 (comment)
  • Loading branch information
DavidKorczynski authored and MartinPetkov committed Aug 15, 2022
1 parent 1849171 commit 17effc0
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
2 changes: 1 addition & 1 deletion infra/base-images/base-builder/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ ENV SANITIZER_FLAGS_dataflow "-fsanitize=dataflow"

ENV SANITIZER_FLAGS_thread "-fsanitize=thread"

ENV SANITIZER_FLAGS_introspector "-flegacy-pass-manager -flto -fno-inline-functions"
ENV SANITIZER_FLAGS_introspector "-flegacy-pass-manager -flto -fno-inline-functions -Wl,-fuse-ld=gold,-flto -Wno-unused-command-line-argument"

# Do not use any sanitizers in the coverage build.
ENV SANITIZER_FLAGS_coverage ""
Expand Down
1 change: 0 additions & 1 deletion infra/base-images/base-builder/compile
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,6 @@ if [ "$FUZZING_LANGUAGE" = "jvm" ]; then
fi

if [ "$SANITIZER" = "introspector" ]; then
export LDFLAGS="-fuse-ld=gold -flto"
export AR=llvm-ar
export NM=llvm-nm
export RANLIB=llvm-ranlib
Expand Down

0 comments on commit 17effc0

Please sign in to comment.