diff --git a/ci/srht/freebsd_script b/ci/srht/freebsd_script index 9edf076c53..aa5f5f18c6 100755 --- a/ci/srht/freebsd_script +++ b/ci/srht/freebsd_script @@ -18,13 +18,45 @@ cd build cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH=$PREFIX -DCMAKE_INSTALL_PREFIX=$(pwd)/release -DZIG_STATIC=ON make $JOBS install -# TODO test everything. right now it's skipping stuff including docs -# because for some reason @cImport is failing on the CI server. -release/bin/zig build --build-file ../build.zig test-behavior -Dskip-release +release/bin/zig build test-fmt +release/bin/zig build test-behavior + +# This test is disabled because it triggers "out of memory" on the sr.ht CI service. +# See https://github.com/ziglang/zig/issues/3210 +# release/bin/zig build test-std + +release/bin/zig build test-compiler-rt + +# This test is disabled because it triggers "out of memory" on the sr.ht CI service. +# See https://github.com/ziglang/zig/issues/3210 +# release/bin/zig build test-compare-output + +# This test is disabled because it triggers "out of memory" on the sr.ht CI service. +# See https://github.com/ziglang/zig/issues/3210 +# release/bin/zig build test-standalone + +release/bin/zig build test-stack-traces +release/bin/zig build test-cli +release/bin/zig build test-asm-link +release/bin/zig build test-runtime-safety + +# This test is disabled because it triggers "out of memory" on the sr.ht CI service. +# See https://github.com/ziglang/zig/issues/3210 +# release/bin/zig build test-translate-c + +release/bin/zig build test-gen-h + +# This test is disabled because it triggers "out of memory" on the sr.ht CI service. +# See https://github.com/ziglang/zig/issues/3210 +# release/bin/zig build test-compile-errors + +# This test is disabled because it triggers "out of memory" on the sr.ht CI service. +# See https://github.com/ziglang/zig/issues/3210 +# release/bin/zig build docs if [ -f ~/.s3cfg ]; then mv ../LICENSE release/ - # TODO re-enable this + # Enable when `release/bin/zig build docs` passes without "out of memory" or failures #mv ../zig-cache/langref.html release/ mv release/bin/zig release/ rmdir release/bin diff --git a/src/link.cpp b/src/link.cpp index 5519f98fd2..1130481dce 100644 --- a/src/link.cpp +++ b/src/link.cpp @@ -1774,6 +1774,10 @@ static void construct_linker_job_elf(LinkJob *lj) { lj->args.append("-lgcc_s"); lj->args.append("--no-as-needed"); } + + if (g->zig_target->os == OsFreeBSD) { + lj->args.append("-lpthread"); + } } else if (target_is_glibc(g->zig_target)) { if (target_supports_libunwind(g->zig_target)) { lj->args.append(build_libunwind(g)); diff --git a/test/standalone/mix_o_files/test.c b/test/standalone/mix_o_files/test.c index d821bbe108..7f9f751a4a 100644 --- a/test/standalone/mix_o_files/test.c +++ b/test/standalone/mix_o_files/test.c @@ -3,6 +3,7 @@ #include #include +#include extern int *x_ptr;