X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=utils%2Fllvm-native-gcc;h=91a557cc161db26df1cf322b968d8473b6f117f3;hb=1b0dc64919e947bb4f4677b138c734e33061f7c4;hp=fb2925233081d70b4036687ec740797a97a243e9;hpb=73d8d55e0e8f424bfed45064029d7419176438f9;p=oota-llvm.git diff --git a/utils/llvm-native-gcc b/utils/llvm-native-gcc index fb292523308..91a557cc161 100755 --- a/utils/llvm-native-gcc +++ b/utils/llvm-native-gcc @@ -4,7 +4,7 @@ # set up defaults. $Verbose = 0; -$SaveTemps = 0; +$SaveTemps = 1; $PreprocessOnly = 0; $CompileDontLink = 0; $Backend = 'cbe'; @@ -114,14 +114,14 @@ sub CompileBytecodeToNative { } else { $GeneratedCode = "/tmp/nativebuild-$$.c"; } - run "llvm-dis -c -f -o $GeneratedCode $BCFile"; + run "llc -enable-correct-eh-support -march=c -f -o $GeneratedCode $BCFile"; } elsif ($Backend eq 'llc') { if ($SaveTemps) { $GeneratedCode = "${OutputFile}.s"; } else { $GeneratedCode = "/tmp/nativebuild-$$.s"; } - run "llc -f -o $GeneratedCode $BCFile"; + run "llc -enable-correct-eh-support -f -o $GeneratedCode $BCFile"; } my $LibDirs = join (" ", @LibDirs); my $Libs = join (" ", @Libs); @@ -145,10 +145,10 @@ sub CompileCToNative { my $GeneratedCode; if ($Backend eq 'cbe') { $GeneratedCode = "${OutputFile}.cbe.c"; - run "llvm-dis -c -f -o $GeneratedCode $BCFile"; + run "llc -enable-correct-eh-support -march=c -f -o $GeneratedCode $BCFile"; } elsif ($Backend eq 'llc') { $GeneratedCode = "${OutputFile}.llc.s"; - run "llc -f -o $GeneratedCode $BCFile"; + run "llc -enable-correct-eh-support -f -o $GeneratedCode $BCFile"; } my $NativeGCCOptions = ""; if ($CompileDontLink) { @@ -193,10 +193,10 @@ native-build [OPTIONS...] FILE llvm-native-gcc is a wrapper around the LLVM command-line tools which generates a native object (.o) file by compiling FILE with llvm-gcc, and then running -an LLVM back-end (CBE by default) over the resulting bytecode, and then +an LLVM back-end (CBE by default) over the resulting bitcode, and then compiling the resulting code to a native object file. -If called as "native-build", it compiles bytecode to native code, and takes +If called as "native-build", it compiles bitcode to native code, and takes different options. =head1 OPTIONS