diff options
author | Nick Mathewson <nickm@torproject.org> | 2020-10-23 10:33:07 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2020-10-23 10:33:07 -0400 |
commit | 2908086694ee3822c8d3116952bec5a415387d75 (patch) | |
tree | f91342c8b52ad57e995c4dabe815fd0b0520e84c /scripts | |
parent | 0d420918e71f94bec3fd4c5010e570b45667d48d (diff) | |
parent | e834702f9d33f228815403055666e957b33c1857 (diff) | |
download | tor-2908086694ee3822c8d3116952bec5a415387d75.tar.gz tor-2908086694ee3822c8d3116952bec5a415387d75.zip |
Merge branch 'combined_libs'
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/build/combine_libs | 35 | ||||
-rwxr-xr-x | scripts/codegen/fuzzing_include_am.py | 7 |
2 files changed, 39 insertions, 3 deletions
diff --git a/scripts/build/combine_libs b/scripts/build/combine_libs new file mode 100755 index 0000000000..fb311552fe --- /dev/null +++ b/scripts/build/combine_libs @@ -0,0 +1,35 @@ +#!/bin/sh + +set -e + +TMPDIR="$(mktemp -d -t tor_lib_combining.XXXXXX)" +ORIGDIR="$(pwd)" + +trap 'cd "$ORIGDIR" && rm -rf "$TMPDIR"' 0 + +abspath() { + echo "$(cd "$(dirname "$1")">/dev/null && pwd)/$(basename "$1")" +} + +TARGET=$(abspath "$1") + +#echo ORIGDIR="$ORIGDIR" +#echo AR="$AR" +#echo ARFLAGS="$AFLAGS" + +shift + +for input in "$@"; do + cd "$ORIGDIR" + abs=$(abspath "$input") + dir="$TMPDIR"/$(basename "$input" .a) + mkdir "$dir" + cd "$dir">/dev/null + ar x "$abs" +done + +cd "$TMPDIR" >/dev/null +#echo "${AR:-ar}" "${ARFLAGS:-cru}" library.tmp.a ./*/** +"${AR:-ar}" "${ARFLAGS:-cru}" library.tmp.a ./*/** +"${RANLIB:-ranlib}" library.tmp.a +mv -f library.tmp.a "$TARGET" diff --git a/scripts/codegen/fuzzing_include_am.py b/scripts/codegen/fuzzing_include_am.py index b3892b6fd3..b52b956f81 100755 --- a/scripts/codegen/fuzzing_include_am.py +++ b/scripts/codegen/fuzzing_include_am.py @@ -31,17 +31,18 @@ FUZZING_CFLAGS = \ FUZZING_LDFLAG = \ @TOR_LDFLAGS_zlib@ $(TOR_LDFLAGS_CRYPTLIB) @TOR_LDFLAGS_libevent@ FUZZING_LIBS = \ - $(TOR_INTERNAL_TESTING_LIBS) \ + src/test/libtor-testing.a \ $(rust_ldadd) \ @TOR_ZLIB_LIBS@ @TOR_LIB_MATH@ \ @TOR_LIBEVENT_LIBS@ $(TOR_LIBS_CRYPTLIB) \ @TOR_LIB_WS32@ @TOR_LIB_IPHLPAPI@ @TOR_LIB_SHLWAPI@ @TOR_LIB_GDI@ @TOR_LIB_USERENV@ @CURVE25519_LIBS@ \ @TOR_SYSTEMD_LIBS@ \ @TOR_LZMA_LIBS@ \ - @TOR_ZSTD_LIBS@ + @TOR_ZSTD_LIBS@ \ + @TOR_TRACE_LIBS@ oss-fuzz-prereqs: \ - $(TOR_INTERNAL_TESTING_LIBS) + src/test/libtor-testing.a noinst_HEADERS += \ src/test/fuzz/fuzzing.h |