Hi! I'm currently trying to retrieve the LLVM IR from the compilation process. To do so, I followed the given instructions. From my perspective I'm not missing anything, but I can't get llvm-goc to emit the llvm IR. I created a transcript and added parameters to the the original call to llvm-goc. Here is my fully modified script:
root@llvmbuilder-successful-s-1vcpu-2gb-fra1-01-s-1vcpu-2gb-fra1-01:~/compile/poc# cat ./poc_transcript.sh rm -r /tmp/go-build598282723 WORK=/tmp/go-build598282723 mkdir -p $WORK/b001/ cat >$WORK/b001/importcfg.link << 'EOF' # internal packagefile _/root/compile/poc=/root/.cache/go-build/11/11b27c148a103033dee37422bbbe76ca68d1cc97f79c6557c0909f358bdd2a5c-d EOF mkdir -p $WORK/b001/exe/ cp /root/.cache/go-build/11/11b27c148a103033dee37422bbbe76ca68d1cc97f79c6557c0909f358bdd2a5c-d $WORK/b001/_pkg1_.a cd $WORK/b001/ ar x ./_pkg1_.a _cgo_flags cd . ar d $WORK/b001/_pkg1_.a _cgo_flags #/root/llvm-install/bin/llvm-goc -v -o $WORK/b001/exe/a.out "-Wl,-(" -m64 -Wl,--whole-archive $WORK/b001/_pkg1_.a -Wl,--no-whole-archive "-Wl,-)" -Wl,--build-id=0x6b69526757524436506941386641384b70444b5f2f66754b585f536a45384b497a713930744a77304e2f54337764784d68356d3164537756767a5f4569542f6b69526757524436506941386641384b70444b5f -Wl,-E -static-libgo/root/llvm-install/bin/llvm-goc -o /root/compile/poc/poc.llvm -S -emit-llvm "-Wl,-(" -m64 -Wl,--whole-archive $WORK/b001/_pkg1_.a -Wl,--no-whole-archive "-Wl,-)" -Wl,--build-id=0x6b69526757524436506941386641384b70444b5f2f66754b585f536a45384b497a713930744a77304e2f54337764784d68356d3164537756767a5f4569542f6b69526757524436506941386641384b70444b5f -Wl,-E -static-libgo #/root/llvm-install/tools/buildid -w $WORK/b001/exe/a.out # internal #mv $WORK/b001/exe/a.out poc With the -S flag there is no dropped output or error message at all. Omitting -S just drops the compiled object into the file given via the -o flag. Here is the output of running my script: root@llvmbuilder-successful-s-1vcpu-2gb-fra1-01-s-1vcpu-2gb-fra1-01:~/compile/poc# LD_LIBRARY_PATH=$LD_LIBRARY_PATH:~/llvm-install/lib:~/llvm-install/lib64/ ./poc_transcript.sh gollvm version 1 (experimental) Candidate GCC install: version: 6.5.0 foundTriple: x86_64-linux-gnu libPath: /usr/lib/gcc/x86_64-linux-gnu/6.5.0 parentLibPath: /usr/lib/gcc/x86_64-linux-gnu/6.5.0/../.. installPath: /usr/lib/gcc/x86_64-linux-gnu/6.5.0 ProgramPaths: FilePaths: /usr/lib/gcc/x86_64-linux-gnu/6.5.0 /usr/lib/gcc/x86_64-linux-gnu/6.5.0/../../../x86_64-linux-gnu Anyone got an idea how that happens? Happy holidays! And thanks for your attention! :) -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.