probably PIC since it's x86-64.
This commit is contained in:
Jacob Heider 2024-06-17 23:11:11 -04:00
parent 7f9795147a
commit 172ab2af49
No known key found for this signature in database
GPG key ID: 59D15ADC7DCD39BB

View file

@ -16,12 +16,19 @@ build:
llvm.org: '*' llvm.org: '*'
script: script:
# graalvm fails to understand our compiler environment # graalvm fails to understand our compiler environment
- run: LINE_PREFIX=","
if: <0.26.0
- run: | - run: |
sed -i '/-H:Class=org.pkl.cli.Main/i\ LINE_PREFIX="add("
add("--static")\ LINE_SUFFIX=")"
add("--native-compiler-path={{deps.llvm.org.prefix}}/bin/clang")\ if: '>=0.26.0'
add("-H:CCompilerOption=-Wl,-L{{deps.zlib.net.prefix}}/lib")\ - run: |
add("-H:-CheckToolchain")' \ sed -i "/-H:Class=org.pkl.cli.Main/i\
${LINE_PREFIX}\"--static\"${LINE_SUFFIX}\
${LINE_PREFIX}\"--native-compiler-path={{deps.llvm.org.prefix}}/bin/clang\"${LINE_SUFFIX}\
${LINE_PREFIX}\"-H:CCompilerOption=-fPIC\"${LINE_SUFFIX}\
${LINE_PREFIX}\"-H:CCompilerOption=-Wl,-pie,-L{{deps.zlib.net.prefix}}/lib\"${LINE_SUFFIX}\
${LINE_PREFIX}\"-H:-CheckToolchain\"${LINE_SUFFIX}" \
pkl-cli.gradle.kts pkl-cli.gradle.kts
if: linux if: linux
working-directory: pkl-cli working-directory: pkl-cli
@ -30,8 +37,6 @@ build:
install -D jpkl {{prefix}}/bin/jpkl install -D jpkl {{prefix}}/bin/jpkl
install -D pkl-${SYS_NAME}-${ARCH_NAME} {{prefix}}/bin/pkl install -D pkl-${SYS_NAME}-${ARCH_NAME} {{prefix}}/bin/pkl
working-directory: pkl-cli/build/executable working-directory: pkl-cli/build/executable
# otherwise segfaults
skip: fix-patchelf
env: env:
darwin: darwin:
SYS_NAME: macos SYS_NAME: macos