Do not pass '-relocation-model=pic' to llc.
authorMikhail Glushenkov <foldr@codedgers.com>
Tue, 31 Mar 2009 18:33:54 +0000 (18:33 +0000)
committerMikhail Glushenkov <foldr@codedgers.com>
Tue, 31 Mar 2009 18:33:54 +0000 (18:33 +0000)
Does not work well on 32 bit targets. Bug reported by Albert Graef.

This patch also adds new "-Wllc,option" syntax to pass options to llc.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68127 91177308-0d34-0410-b5e6-96231b3b80d8

tools/llvmc/plugins/Base/Base.td

index 18372de617e943373f4b41e4d8ff3cc2958a64dc..ec6f87cfc7cb5ec6d0a82be2f64874a54bf5cf9d 100644 (file)
@@ -38,6 +38,8 @@ def OptList : OptionList<[
     (help "Add a directory to include path")),
  (prefix_list_option "Wa,",
     (help "Pass options to assembler")),
+ (prefix_list_option "Wllc,",
+    (help "Pass options to llc")),
  (prefix_list_option "L",
     (help "Add a directory to link path")),
  (prefix_list_option "l",
@@ -113,8 +115,10 @@ def llc : Tool<
 [(in_language "llvm-bitcode"),
  (out_language "assembler"),
  (output_suffix "s"),
- (cmd_line "llc -relocation-model=pic -f $INFILE -o $OUTFILE"),
- (actions (case (switch_on "S"), (stop_compilation)))
+ (cmd_line "llc -f $INFILE -o $OUTFILE"),
+ (actions (case
+          (switch_on "S"), (stop_compilation),
+          (not_empty "Wllc,"), (unpack_values "Wllc,")))
 ]>;
 
 // Base class for linkers