From be9a14ea317bfc6fef26f38a6bd763ad15b14d39 Mon Sep 17 00:00:00 2001 From: Matt Godbolt Date: Mon, 16 Oct 2023 21:35:57 -0500 Subject: [PATCH] Tweaks to hylo generation. Still not quite there, but closers --- hylo/README.md | 4 +++- hylo/build.sh | 5 ++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/hylo/README.md b/hylo/README.md index 0519ecb..2fe38ee 100644 --- a/hylo/README.md +++ b/hylo/README.md @@ -1 +1,3 @@ - \ No newline at end of file +### Builder for Hylo + +This is the build setup for [Hylo](https://www.hylo-lang.org/). diff --git a/hylo/build.sh b/hylo/build.sh index fc31357..01ce901 100755 --- a/hylo/build.sh +++ b/hylo/build.sh @@ -45,12 +45,11 @@ swift build --static-swift-stdlib -c release --product hc # To ensure we only muck with rpaths for these objects, do this work in a temporary directory. # This code copied and modified from compiler-explorer/cobol-builder/build/build.sh mkdir -p .build/release/ce_temp_dir -# REVIEW: Why did the cobol version remove pthread and libc? # Note: Use grep to omit virtual shared dynamic objects. -cp $(ldd ".build/release/hc" | grep -E '=> /' | awk '{print $3}') .build/release/ce_temp_dir/ +cp $(ldd ".build/release/hc" | grep -E '=> /' | grep -Ev 'lib(pthread|c|dl|rt).so' | awk '{print $3}') .build/release/ce_temp_dir/ patchelf --set-rpath '$ORIGIN' $(find .build/release/ce_temp_dir/ -name \*.so\*) mv .build/release/ce_temp_dir/* .build/release # Note: No need to update rpath for `hc` itself, as it is already $ORIGIN by default. rmdir .build/release/ce_temp_dir/ -complete .build/release/ "${FULLNAME}" "${OUTPUT}" +complete .build/release/ "hylo-${VERSION}" "${OUTPUT}"