Skip to content

Commit

Permalink
Tweaks to hylo generation. Still not quite there, but closers
Browse files Browse the repository at this point in the history
  • Loading branch information
mattgodbolt committed Oct 17, 2023
1 parent 0149386 commit be9a14e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
4 changes: 3 additions & 1 deletion hylo/README.md
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@

### Builder for Hylo

This is the build setup for [Hylo](https://www.hylo-lang.org/).
5 changes: 2 additions & 3 deletions hylo/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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}"

0 comments on commit be9a14e

Please sign in to comment.