Permalink
Find file
Fetching contributors…
Cannot retrieve contributors at this time
executable file 22 lines (20 sloc) 420 Bytes
#!/bin/bash
# wrap only for external shared libs if -link-as-library -native
# but not for libperl.so -disable-internalize
case "$*" in
"*-disable-internalize *")
llvm-ld $*
;;
"* -link-as-library -native *")
if getopts "o:" opt; then
o=$OPTARG
args=`echo "$@"|sed -e's/-o [^ ]* //'`
llvm-ld $args -o a.out && llc a.out -o - | as -o $o
else
llvm-ld $*
fi
;;
"*")
llvm-ld $*
;;
esac