New experimental/undocumented feature: 'works_on_empty'.
[oota-llvm.git] / tools / llvmc / plugins / Base / Base.td.in
index 284c5f95fbe41d2f4fdb4c5de1263299587948ff..d36554c9da9075975ac01ddc626f9b762603ce4a 100644 (file)
@@ -76,6 +76,8 @@ def OptList : OptionList<[
     (help "Specifies a framework to link against")),
  (parameter_list_option "weak_framework",
     (help "Specifies a framework to weakly link against"), (hidden)),
+ (parameter_option "filelist", (hidden),
+    (help "Link the files listed in file")),
  (prefix_list_option "F",
     (help "Add a directory to framework search path")),
  (prefix_list_option "I",
@@ -242,6 +244,8 @@ class llvm_gcc_based_linker <string cmd_prefix> : Tool<
  (out_language "executable"),
  (output_suffix "out"),
  (cmd_line !strconcat(cmd_prefix, " $INFILE -o $OUTFILE")),
+ (works_on_empty (case (not_empty "filelist"), true,
+                       (default), false)),
  (join),
  (actions (case
           (switch_on "pthread"), (append_cmd "-lpthread"),
@@ -250,6 +254,7 @@ class llvm_gcc_based_linker <string cmd_prefix> : Tool<
           (not_empty "arch"), (forward "arch"),
           (not_empty "framework"), (forward "framework"),
           (not_empty "weak_framework"), (forward "weak_framework"),
+          (not_empty "filelist"), (forward "filelist"),
           (switch_on "m32"), (forward "m32"),
           (switch_on "m64"), (forward "m64"),
           (not_empty "l"), (forward "l"),