Skip to content

Commit 703937d

Browse files
committed
oss-fuzz: enable -fstrict-vtable-pointers
1 parent 9383639 commit 703937d

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

.ci/oss-fuzz.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,12 @@ RAWSPEED_BUILD="$WORK/rawspeed"
2525

2626
ln -f -s /usr/local/bin/lld /usr/bin/ld
2727

28+
CFLAGS="$CFLAGS -flto=thin"
29+
CXXFLAGS="$CXXFLAGS -flto=thin"
30+
2831
CXXFLAGS="$CXXFLAGS -fforce-emit-vtables"
32+
# CXXFLAGS="$CXXFLAGS -fwhole-program-vtables" # DOES NOT WORK WITH SANCOV!
33+
CXXFLAGS="$CXXFLAGS -fstrict-vtable-pointers"
2934

3035
THINLTO_CACHE="$WORK/thinlto-cache"
3136
LDFLAGS="${LDFLAGS:-} -Wl,--thinlto-cache-dir=\"$THINLTO_CACHE\""

cmake/compiler-flags.cmake

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,8 @@ if(CMAKE_INTERPROCEDURAL_OPTIMIZATION)
5454
if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
5555
set(LIST )
5656
list(APPEND LIST -fforce-emit-vtables)
57-
list(APPEND LIST -fno-whole-program-vtables)
58-
list(APPEND LIST -fno-strict-vtable-pointers)
57+
# list(APPEND LIST -fwhole-program-vtables) # DOES NOT WORK WITH SANCOV!
58+
list(APPEND LIST -fstrict-vtable-pointers)
5959
add_compile_options("$<$<COMPILE_LANGUAGE:C,CXX>:${LIST}>")
6060
endif()
6161
endif()

0 commit comments

Comments
 (0)