summaryrefslogtreecommitdiffstats
path: root/tools/llvmc/plugins/Base/Base.td.in
diff options
context:
space:
mode:
Diffstat (limited to 'tools/llvmc/plugins/Base/Base.td.in')
-rw-r--r--tools/llvmc/plugins/Base/Base.td.in20
1 files changed, 20 insertions, 0 deletions
diff --git a/tools/llvmc/plugins/Base/Base.td.in b/tools/llvmc/plugins/Base/Base.td.in
index c26a567..125e95c 100644
--- a/tools/llvmc/plugins/Base/Base.td.in
+++ b/tools/llvmc/plugins/Base/Base.td.in
@@ -38,6 +38,10 @@ def OptList : OptionList<[
(help "Compile and assemble, but do not link")),
(switch_option "pthread",
(help "Enable threads")),
+ (switch_option "fPIC",
+ (help "Relocation model: PIC"), (hidden)),
+ (switch_option "mdynamic-no-pic",
+ (help "Relocation model: dynamic-no-pic"), (hidden)),
(parameter_option "linker",
(help "Choose linker (possible values: gcc, g++)")),
(parameter_option "MF",
@@ -47,6 +51,12 @@ def OptList : OptionList<[
(hidden)),
(parameter_list_option "include",
(help "Include the named file prior to preprocessing")),
+ (parameter_list_option "framework",
+ (help "Specifies a framework to link against")),
+ (parameter_list_option "weak_framework",
+ (help "Specifies a framework to weakly link against"), (hidden)),
+ (prefix_list_option "F",
+ (help "Add a directory to framework search path")),
(prefix_list_option "I",
(help "Add a directory to include path")),
(prefix_list_option "D",
@@ -105,11 +115,15 @@ class llvm_gcc_based <string cmd_prefix, string in_lang, string E_ext> : Tool<
(and (switch_on "emit-llvm"), (switch_on "c")), (stop_compilation),
(switch_on "fsyntax-only"), (stop_compilation),
(not_empty "include"), (forward "include"),
+ (not_empty "save-temps"), (append_cmd "-save-temps"),
(not_empty "I"), (forward "I"),
+ (not_empty "F"), (forward "F"),
(not_empty "D"), (forward "D"),
(switch_on "O1"), (forward "O1"),
(switch_on "O2"), (forward "O2"),
(switch_on "O3"), (forward "O3"),
+ (switch_on "fPIC"), (forward "fPIC"),
+ (switch_on "mdynamic-no-pic"), (forward "mdynamic-no-pic"),
(not_empty "MF"), (forward "MF"),
(not_empty "MT"), (forward "MT"))),
(sink)
@@ -162,6 +176,9 @@ def llc : Tool<
(switch_on "O1"), (forward "O1"),
(switch_on "O2"), (forward "O2"),
(switch_on "O3"), (forward "O3"),
+ (switch_on "fPIC"), (append_cmd "-relocation-model=pic"),
+ (switch_on "mdynamic-no-pic"),
+ (append_cmd "-relocation-model=dynamic-no-pic"),
(not_empty "Wllc,"), (unpack_values "Wllc,")))
]>;
@@ -175,6 +192,9 @@ class llvm_gcc_based_linker <string cmd_prefix> : Tool<
(actions (case
(switch_on "pthread"), (append_cmd "-lpthread"),
(not_empty "L"), (forward "L"),
+ (not_empty "F"), (forward "F"),
+ (not_empty "framework"), (forward "framework"),
+ (not_empty "weak_framework"), (forward "weak_framework"),
(not_empty "l"), (forward "l"),
(not_empty "Wl,"), (forward "Wl,")))
]>;
OpenPOWER on IntegriCloud