Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 0 additions & 20 deletions build/config/linux/pkg_config.gni
Original file line number Diff line number Diff line change
Expand Up @@ -139,26 +139,6 @@ template("pkg_config") {
lib_dirs = pkgresult[4]
}

# Link libraries statically for OSS-Fuzz fuzzer build
if (oss_fuzz) {
# Output libs needed for static linking (direct + transitive/non-direct libs), we will re-execute the script to get those libs
args += [ "--static" ]
pkgresult_static = exec_script(pkg_config_script, args, "value")
libs = []
ldflags = [ "-Wl,-Bstatic" ]
foreach(lib, pkgresult_static[3]) {
# dl(dynamic loading) lib is not needed for linking statically and its presence triggers errors.
# example of errors:
# ld.lld: error: undefined symbol: __dlsym
# >>> referenced by dlsym.o:(dlsym) in archive /lib/x86_64-linux-gnu/libdl.a
if (lib != "dl") {
ldflags += [ "-l$lib" ]
}
}
ldflags += [ "-Wl,-Bdynamic" ]
lib_dirs = pkgresult[4]
}

forward_variables_from(invoker, [ "defines" ])
}
}
Expand Down
Loading