1; Processor-independent options for Darwin.
2
3; Copyright (C) 2005-2018 Free Software Foundation, Inc.
4;
5; This file is part of GCC.
6;
7; GCC is free software; you can redistribute it and/or modify it under
8; the terms of the GNU General Public License as published by the Free
9; Software Foundation; either version 3, or (at your option) any later
10; version.
11;
12; GCC is distributed in the hope that it will be useful, but WITHOUT ANY
13; WARRANTY; without even the implied warranty of MERCHANTABILITY or
14; FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
15; for more details.
16;
17; You should have received a copy of the GNU General Public License
18; along with GCC; see the file COPYING3.  If not see
19; <http://www.gnu.org/licenses/>.
20
21; We have a lot of Driver options, many of which are obsolete or very very
22; rarely used so, to keep this file easier to manage:
23
24; Please place all Non-driver options first (in alphabetical order), followed
25; by Driver-only options.
26
27; Non-driver options.
28
29dependency-file
30C ObjC C++ ObjC++ Separate Alias(MF) MissingArgError(missing filename after %qs)
31
32fapple-kext
33Target Report C++ Var(flag_apple_kext)
34Generate code for darwin loadable kernel extensions.
35
36iframework
37Target RejectNegative C ObjC C++ ObjC++ Joined Separate
38-iframework <dir>	Add <dir> to the end of the system framework include path.
39
40mconstant-cfstrings
41Target Report Var(darwin_constant_cfstrings) Init(1)
42Generate compile-time CFString objects.
43
44Wnonportable-cfstrings
45Target Report Var(darwin_warn_nonportable_cfstrings) Init(1) Warning
46Warn if constant CFString objects contain non-portable characters.
47
48; Use new-style pic stubs if this is true, x86 only so far.
49matt-stubs
50Target Report Var(darwin_macho_att_stub) Init(1)
51Generate AT&T-style stubs for Mach-O.
52
53mdynamic-no-pic
54Target Common Report Mask(MACHO_DYNAMIC_NO_PIC)
55Generate code suitable for executables (NOT shared libs).
56
57mfix-and-continue
58Target Report Var(darwin_fix_and_continue)
59Generate code suitable for fast turn around debugging.
60
61mkernel
62Target Report Var(flag_mkernel)
63Generate code for the kernel or loadable kernel extensions.
64
65; The Init here is for the convenience of GCC developers, so that cc1
66; and cc1plus don't crash if no -mmacosx-version-min is passed.  The
67; driver will always pass a -mmacosx-version-min, so in normal use the
68; Init is never used.
69mmacosx-version-min=
70Target RejectNegative Joined Report Var(darwin_macosx_version_min) Init(DEF_MIN_OSX_VERSION)
71The earliest MacOS X version on which this program will run.
72
73; Really, only relevant to PowerPC which has a 4 byte bool by default.
74mone-byte-bool
75Target RejectNegative Report Var(darwin_one_byte_bool)
76Set sizeof(bool) to 1.
77
78msymbol-stubs
79Target Report Var(darwin_symbol_stubs) Init(0)
80Force generation of external symbol indirection stubs.
81
82; Some code-gen may be improved / adjusted if the linker is sufficiently modern.
83mtarget-linker=
84Target RejectNegative Joined Report Alias(mtarget-linker)
85
86mtarget-linker
87Target RejectNegative Joined Separate Report Var(darwin_target_linker) Init(LD64_VERSION)
88The version of ld64 in use for this toolchain.
89
90; Driver options.
91
92all_load
93Driver RejectNegative Alias(Zall_load)
94Loads all members of archive libraries
95
96allowable_client
97Driver RejectNegative Separate Alias(Zallowable_client)
98-allowable_client <name>	The output dylib is private to the client(s) named
99
100arch
101Driver RejectNegative Separate
102-arch <name>	Specify that the output file should be generated for architecture  \"name\"
103
104arch_errors_fatal
105Driver RejectNegative Alias(Zarch_errors_fatal)
106Mismatches between file architecture and the \"-arch\" are errors instead of warnings
107
108asm_macosx_version_min=
109Driver RejectNegative Joined
110The earliest MacOS X version on which this program will run (formatted for the assembler)
111
112bind_at_load
113Driver RejectNegative Alias(Zbind_at_load)
114Produce an output file that will bind symbols on load, rather than lazily.
115
116bundle
117Driver RejectNegative Alias(Zbundle)
118Produce a Mach-O bundle (file type MH_BUNDLE)
119
120bundle_loader
121Driver RejectNegative Separate Alias(Zbundle_loader)
122-bundle_loader <executable>	Treat \"executable\" (that will be loading this bundle) as if it was one of the dynamic libraries the bundle is linked against for symbol resolution
123
124client_name
125Driver RejectNegative Separate
126-client_name <name>	Enable the executable being built to link against a private dylib (using allowable_client)
127
128compatibility_version
129Driver RejectNegative Separate
130-compatibility_version <number>	Set the minimum version for the client interface.  Clients must record a greater number than this or the binding will fail at runtime
131
132current_version
133Driver RejectNegative Separate
134-current_version <number>	Set the current version for the library.
135
136dead_strip
137Driver RejectNegative Alias(Zdead_strip)
138Remove code and data that is unreachable from any exported symbol (including the entry point)
139
140dylib_file
141Driver Separate Alias(Zdylib_file)
142
143dylinker
144Driver RejectNegative
145Produce a Mach-O dylinker (file type MH_DYLINKER), only used for building dyld.
146
147dylinker_install_name
148Driver RejectNegative Separate
149-dylinker_install_name <path>	Only used for building dyld.
150
151dynamic
152Driver RejectNegative Alias(Zdynamic)
153The default (and opposite of -static), implied by user mode executables, shared libraries and bundles.
154
155dynamiclib
156Driver RejectNegative Alias(Zdynamiclib)
157Produce a Mach-O shared library (file type MH_DYLIB), synonym for -shared
158
159exported_symbols_list
160Driver RejectNegative Separate Alias(Zexported_symbols_list)
161-exported_symbols_list <filename>	Global symbols in \"filename\" will be exported from the linked output file, any symbols not mentioned will be treated as hidden.
162
163filelist
164Driver RejectNegative Separate
165Supply a list of objects to be linked from a file, rather than the command line
166
167findirect-virtual-calls
168Driver RejectNegative
169Used for generating code for some older kernel revisions.
170
171flat_namespace
172Driver RejectNegative Alias(Zflat_namespace)
173Ignore the normal two-level namespace; resolve symbols in command line order and do not record which library provided the resolved symbol.
174
175force_cpusubtype_ALL
176Driver RejectNegative Alias(Zforce_cpusubtype_ALL)
177For the assembler (and linker) permit any architecture sub-variant to be used without error.
178
179force_flat_namespace
180Driver RejectNegative Alias(Zforce_flat_namespace)
181Set the output object such that, on loading, dyld  will ignore any two-level information and resolve symbols in the discovery order for loaded libs.
182
183framework
184Driver RejectNegative Separate
185-framework <name>	The linker should search for the named framework in the framework search path.
186
187fterminated-vtables
188Driver RejectNegative
189Used for generating code for some older kernel revisions.
190
191gfull
192Driver RejectNegative
193Abbreviation for \"-g -fno-eliminate-unused-debug-symbols\"
194
195gused
196Driver RejectNegative
197Abbreviation for \"-g -feliminate-unused-debug-symbols\"
198
199headerpad_max_install_names
200Driver RejectNegative
201Automatically adds space for longer path names in load commands (up to MAXPATHLEN)
202
203image_base
204Driver RejectNegative Separate Alias(Zimage_base)
205-image_base <address>	Choose a base address for a dylib or bundle.
206
207init
208Driver RejectNegative Separate Alias(Zinit)
209-init <symbol_name>	The symbol \"symbol_name\" will be used as the first initialiser for a dylib.
210
211install_name
212Driver RejectNegative Separate Alias(Zinstall_name)
213-install_name <name>	Set the install name for a dylib.
214
215keep_private_externs
216Driver RejectNegative
217Usually \"private extern\" (hidden) symbols are made local when linking, this command suppresses that such that they remain exported.
218
219multi_module
220Driver RejectNegative Alias(Zmulti_module)
221(Obsolete after 10.4) Multi modules are ignored at runtime since MacOS 10.4
222
223multiply_defined
224Driver RejectNegative Separate Alias(Zmultiply_defined)
225(Obsolete after 10.4) -multiply_defined <treatment> Provided a mechanism for warning about symbols defined in multiple dylibs.
226
227multiply_defined_unused
228Driver RejectNegative Separate Alias(Zmultiplydefinedunused)
229(Obsolete after 10.4) -multiply_defined_unused <treatment>	Provided a mechanism for warning about symbols defined in the current executable also being defined in linked dylibs.
230
231no_dead_strip_inits_and_terms
232Driver RejectNegative Alias(Zno_dead_strip_inits_and_terms)
233(Obsolete) The linker never dead strips these items, so the option is not needed.
234
235nofixprebinding
236Driver RejectNegative
237(Obsolete after 10.3.9) Set MH_NOPREFIXBINDING, in an exectuable.
238
239nomultidefs
240Driver RejectNegative
241(Obsolete after 10.4)	Set MH_NOMULTIDEFS in an umbrella framework.
242
243noprebind
244Driver RejectNegative Negative(prebind)
245(Obsolete) LD_PREBIND is no longer supported.
246
247noseglinkedit
248Driver RejectNegative Negative(seglinkedit)
249(Obsolete) This is the default.
250
251object
252Driver RejectNegative
253
254pagezero_size
255Driver RejectNegative Separate
256-pagezero_size size	Allows setting the page 0 size to 4kb for certain special cases.
257
258prebind
259Driver RejectNegative Negative(noprebind)
260(Obsolete) LD_PREBIND is no longer supported.
261
262prebind_all_twolevel_modules
263Driver RejectNegative
264(Obsolete) LD_PREBIND is no longer supported.
265
266preload
267Driver RejectNegative
268Produces a Mach-O file suitable for embedded/ROM use.
269
270private_bundle
271Driver RejectNegative
272(Obsolete) Allowed linking to proceed with \"-flat_namespace\" when a linked bundle contained a symbol also exported from the main executable.
273
274pthread
275Driver RejectNegative
276
277rdynamic
278Driver RejectNegative
279Synonym for \"-export-dynamic\" for linker versions that support it.
280
281read_only_relocs
282Driver RejectNegative Separate
283-read_only_relocs <treatment>	This will allow relocs in read-only pages (not advisable).
284
285sectalign
286Driver RejectNegative Separate Args(3)
287-sectalign <segname> <sectname> <value>	Set section \"sectname\" in segment \"segname\" to have alignment \"value\" which must be an integral power of two expressed in hexadecimal form.
288
289sectcreate
290Driver RejectNegative Separate Args(3)
291-sectcreate <segname> <sectname> <file>	Create section \"sectname\" in segment \"segname\" from the contents of \"file\".
292
293sectobjectsymbols
294Driver RejectNegative Separate Args(2)
295(Obsolete) -sectobjectsymbols <segname> <sectname>	Setting a local symbol at the start of a section is no longer supported.
296
297sectorder
298Driver RejectNegative Separate Args(3)
299(Obsolete) -sectorder <segname> <sectname> orderfile	Replaced by a more general option \"-order_file\".
300
301seg_addr_table
302Driver RejectNegative Separate Alias(Zseg_addr_table)
303-seg_addr_table <file>	Specify the base addresses for dynamic libraries, \"file\" contains a line for each library.
304
305; This is only usable by the ld_classic linker.
306seg_addr_table_filename
307Driver RejectNegative Separate Alias(Zfn_seg_addr_table_filename)
308(Obsolete, ld_classic only) -seg_addr_table_filename <path>
309
310seg1addr
311Driver RejectNegative Separate
312Synonym for \"image_base\"
313
314segaddr
315Driver RejectNegative Separate Args(2) Alias(Zsegaddr)
316-segaddr <name> <address>	Set the base address of segment \"name\" to \"address\" which must be aligned to a page boundary (currently 4kb).
317
318; This is only usable by the ld_classic linker.
319segcreate
320Driver RejectNegative Separate Args(3)
321(Obsolete, ld_classic only) -sectcreate segname sectname file
322
323seglinkedit
324Driver RejectNegative Negative(noseglinkedit)
325(Obsolete) Object files with LINKEDIT sections are no longer supported.
326
327segprot
328Driver RejectNegative Separate Args(3)
329-segprot <segname> max_prot init_prot	The protection values are \"r\", \"w\", \"x\" or \"-\" the latter meaning \"no access\".
330
331segs_read_only_addr
332Driver RejectNegative Separate Alias(Zsegs_read_only_addr)
333-segs_read_only_addr address 	Allows specifying the address of the read only portion of a dylib.
334
335segs_read_write_addr
336Driver RejectNegative Separate Alias(Zsegs_read_write_addr)
337-segs_read_write_addr address 	Allows specifying the address of the read/write portion of a dylib.
338
339single_module
340Driver RejectNegative Alias(Zsingle_module)
341(Obsolete)	This is the default.
342
343sub_library
344Driver RejectNegative Separate
345-sub_library <name>	Library named \"name\" will be re-exported (only useful for dylibs).
346
347sub_umbrella
348Driver RejectNegative Separate
349-sub_umbrella <name>	Framework named \"name\" will be re-exported (only useful for dylibs).
350
351twolevel_namespace
352Driver RejectNegative
353This is the default
354
355twolevel_namespace_hints
356Driver RejectNegative
357Specifies content that can speed up dynamic loading when the binaries are unchanged.
358
359umbrella
360Driver RejectNegative Separate Alias(Zumbrella)
361-umbrella <framework>	The specified framework will be re-exported.
362
363undefined
364Driver RejectNegative Separate
365-undefined <treatment>	Specify the handling for undefined symbols (default is error).
366
367unexported_symbols_list
368Driver RejectNegative Separate Alias(Zunexported_symbols_list)
369-unexported_symbols_list <filename>	Don't export global symbols listed in filename.
370
371weak_reference_mismatches
372Driver RejectNegative Separate Alias(Zweak_reference_mismatches)
373-weak_reference_mismatches <treatment>	Specifies what to do if a symbol import conflicts between file (weak in one and not in another) the default is to treat the symbol as non-weak.
374
375whatsloaded
376Driver RejectNegative
377Logs the object files the linker loads
378
379whyload
380Driver RejectNegative
381Logs which symbol(s) caused an object to be loaded.
382
383;(Obsolete, ignored)	Strip symbols starting with "L", this is the default.
384X
385Driver RejectNegative
386
387y
388Driver RejectNegative Joined
389(Obsolete, ignored)	Old support similar to whyload.
390
391Mach
392Driver RejectNegative
393(Obsolete and unhandled by ld64, ignored)	ld should produce an executable (only handled by ld_classic).
394
395;; These are not "real" options, but placeholders used to hide the real options
396;; from generic options processing... FIXME: they can be eliminated now.
397
398Zall_load
399Driver
400
401Zallowable_client
402Driver Separate
403
404Zarch_errors_fatal
405Driver
406
407Zbind_at_load
408Driver
409
410Zbundle
411Driver
412
413Zbundle_loader
414Driver Separate
415
416Zdead_strip
417Driver
418
419Zdylib_file
420Driver Separate
421
422Zdynamic
423Driver
424
425Zdynamiclib
426Driver
427
428Zexported_symbols_list
429Driver Separate
430
431Zfn_seg_addr_table_filename
432Driver Separate
433
434Zflat_namespace
435Driver
436
437Zforce_cpusubtype_ALL
438Driver
439
440Zforce_flat_namespace
441Driver
442
443Zimage_base
444Driver Separate
445
446Zinit
447Driver Separate
448
449Zinstall_name
450Driver Separate
451
452Zmulti_module
453Driver
454
455Zmultiply_defined
456Driver Separate
457
458Zmultiplydefinedunused
459Driver Separate
460
461Zno_dead_strip_inits_and_terms
462Driver
463
464Zseg_addr_table
465Driver Separate
466
467Zsegaddr
468Driver Separate Args(2)
469
470Zsegs_read_only_addr
471Driver Separate
472
473Zsegs_read_write_addr
474Driver Separate
475
476Zsingle_module
477Driver
478
479Zumbrella
480Driver Separate
481
482Zunexported_symbols_list
483Driver Separate
484
485Zweak_reference_mismatches
486Driver Separate
487
488