Support -[weak_]framework and -F in llvmc.

llvm-svn: 90210
This commit is contained in:
Mikhail Glushenkov 2009-12-01 05:59:55 +00:00
parent 8a948265a1
commit f30281e08a
2 changed files with 28 additions and 7 deletions

View File

@ -126,24 +126,31 @@ use the B<-Wo,> option.
=item B<-I> I<directory> =item B<-I> I<directory>
Add a directory to the header file search path. This option can be Add a directory to the header file search path.
repeated.
=item B<-L> I<directory> =item B<-L> I<directory>
Add I<directory> to the library search path. This option can be Add I<directory> to the library search path.
repeated.
=item B<-F> I<directory>
Add I<directory> to the framework search path.
=item B<-l>I<name> =item B<-l>I<name>
Link in the library libI<name>.[bc | a | so]. This library should Link in the library libI<name>.[bc | a | so]. This library should
be a bitcode library. be a bitcode library.
=item B<-framework> I<name>
Link in the library libI<name>.[bc | a | so]. This library should
be a bitcode library.
=item B<-emit-llvm> =item B<-emit-llvm>
Make the output be LLVM bitcode (with B<-c>) or assembly (with B<-S>) instead Output LLVM bitcode (with B<-c>) or assembly (with B<-S>) instead of native
of native object (or assembly). If B<-emit-llvm> is given without either B<-c> object (or assembly). If B<-emit-llvm> is given without either B<-c> or B<-S>
or B<-S> it has no effect. it has no effect.
=item B<-Wa> =item B<-Wa>
@ -157,6 +164,10 @@ Pass options to linker.
Pass options to opt. Pass options to opt.
=item B<-Wllc>
Pass options to llc (code generator).
=back =back
=head1 EXIT STATUS =head1 EXIT STATUS

View File

@ -47,6 +47,12 @@ def OptList : OptionList<[
(hidden)), (hidden)),
(parameter_list_option "include", (parameter_list_option "include",
(help "Include the named file prior to preprocessing")), (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", (prefix_list_option "I",
(help "Add a directory to include path")), (help "Add a directory to include path")),
(prefix_list_option "D", (prefix_list_option "D",
@ -106,6 +112,7 @@ class llvm_gcc_based <string cmd_prefix, string in_lang, string E_ext> : Tool<
(switch_on "fsyntax-only"), (stop_compilation), (switch_on "fsyntax-only"), (stop_compilation),
(not_empty "include"), (forward "include"), (not_empty "include"), (forward "include"),
(not_empty "I"), (forward "I"), (not_empty "I"), (forward "I"),
(not_empty "F"), (forward "F"),
(not_empty "D"), (forward "D"), (not_empty "D"), (forward "D"),
(switch_on "O1"), (forward "O1"), (switch_on "O1"), (forward "O1"),
(switch_on "O2"), (forward "O2"), (switch_on "O2"), (forward "O2"),
@ -175,6 +182,9 @@ class llvm_gcc_based_linker <string cmd_prefix> : Tool<
(actions (case (actions (case
(switch_on "pthread"), (append_cmd "-lpthread"), (switch_on "pthread"), (append_cmd "-lpthread"),
(not_empty "L"), (forward "L"), (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 "l"), (forward "l"),
(not_empty "Wl,"), (forward "Wl,"))) (not_empty "Wl,"), (forward "Wl,")))
]>; ]>;