gcov: make profile merging smarter
[official-gcc.git] / gcc / config / darwin.opt
blob23f359367ce3156958660e0acc19d6759e8d48b4
1 ; Processor-independent options for Darwin.
3 ; Copyright (C) 2005-2021 Free Software Foundation, Inc.
5 ; This file is part of GCC.
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.
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.
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/>.
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:
24 ; Please place all Non-driver options first (in alphabetical order), followed
25 ; by Driver-only options.
27 ; Non-driver options.
29 dependency-file
30 C ObjC C++ ObjC++ Separate Alias(MF) MissingArgError(missing filename after %qs)
32 fapple-kext
33 Target C++ Var(flag_apple_kext)
34 Generate code for darwin loadable kernel extensions.
36 iframework
37 Target RejectNegative C ObjC C++ ObjC++ Joined Separate
38 -iframework <dir>       Add <dir> to the end of the system framework include path.
40 mconstant-cfstrings
41 Target Var(darwin_constant_cfstrings) Init(1)
42 Generate compile-time CFString objects.
44 Wnonportable-cfstrings
45 Target Var(darwin_warn_nonportable_cfstrings) Init(1) Warning
46 Warn if constant CFString objects contain non-portable characters.
48 ; Use new-style pic stubs if this is true, x86 only so far.
49 matt-stubs
50 Target Var(darwin_macho_att_stub) Init(1)
51 Generate AT&T-style stubs for Mach-O.
53 mdynamic-no-pic
54 Target Common Mask(MACHO_DYNAMIC_NO_PIC)
55 Generate code suitable for executables (NOT shared libs).
57 mfix-and-continue
58 Target Var(darwin_fix_and_continue)
59 Generate code suitable for fast turn around debugging.
61 mkernel
62 Target Var(flag_mkernel)
63 Generate code for the kernel or loadable kernel extensions.
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.
69 mmacosx-version-min=
70 Target RejectNegative Joined Var(darwin_macosx_version_min) Init(DEF_MIN_OSX_VERSION)
71 The earliest macOS version on which this program will run.
73 ; Really, only relevant to PowerPC which has a 4 byte bool by default.
74 mone-byte-bool
75 Target RejectNegative Var(darwin_one_byte_bool)
76 Set sizeof(bool) to 1.
78 msymbol-stubs
79 Target Var(darwin_symbol_stubs) Init(0)
80 Force generation of external symbol indirection stubs.
82 ; Some code-gen may be improved / adjusted if the linker is sufficiently modern.
83 mtarget-linker=
84 Target RejectNegative Joined Alias(mtarget-linker)
86 mtarget-linker
87 Target RejectNegative Joined Separate Var(darwin_target_linker) Init(LD64_VERSION)
88 -mtarget-linker <version>       Specify that ld64 <version> is the toolchain linker for the current invocation.
90 ; Driver options.
92 all_load
93 Driver RejectNegative Alias(Zall_load)
94 Load all members of archive libraries, rather than only those that satisfy undefined symbols.
96 allowable_client
97 Driver RejectNegative Separate Alias(Zallowable_client)
98 -allowable_client <name>        The output dylib is private to the client <name>.
100 arch
101 Driver RejectNegative Separate
102 -arch <name>    Generate output for architecture <name>.
104 arch_errors_fatal
105 Driver RejectNegative Alias(Zarch_errors_fatal)
106 Mismatches between file architecture and one specified by \"-arch\" are errors instead of warnings.
108 asm_macosx_version_min=
109 Driver RejectNegative Joined
110 The earliest macOS version on which this program will run (formatted for the assembler).
112 bind_at_load
113 Driver RejectNegative Alias(Zbind_at_load)
114 Generate an output executable that binds symbols on load, rather than lazily.
116 bundle
117 Driver RejectNegative Alias(Zbundle)
118 Generate a Mach-O bundle (file type MH_BUNDLE).
120 bundle_loader
121 Driver 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.
124 client_name
125 Driver RejectNegative Separate
126 -client_name <name>     Enable the executable being built to link against a private dylib (using allowable_client).
128 compatibility_version
129 Driver RejectNegative Separate
130 -compatibility_version <number> Set the version for the client interface.  Client programs must record a value less than or equal to <number>, or the binding will fail at runtime.
132 current_version
133 Driver RejectNegative Separate
134 -current_version <number>       Set the current version for the library to <number>.
136 dead_strip
137 Driver RejectNegative Alias(Zdead_strip)
138 Remove code and data that is unreachable from any exported symbol (including the entry point).
140 dylib_file
141 Driver Separate Alias(Zdylib_file)
143 dylinker
144 Driver RejectNegative
145 Produce a Mach-O dylinker (file type MH_DYLINKER), only used for building dyld.
147 dylinker_install_name
148 Driver RejectNegative Separate
149 -dylinker_install_name <path>   Only used for building dyld.
151 dynamic
152 Driver RejectNegative Alias(Zdynamic)
153 The default (and opposite of -static), implied by user mode executables, shared libraries and bundles.
155 dynamiclib
156 Driver RejectNegative Alias(Zdynamiclib)
157 Produce a Mach-O shared library (file type MH_DYLIB), synonym for \"-shared\".
159 exported_symbols_list
160 Driver RejectNegative Separate Alias(Zexported_symbols_list)
161 -exported_symbols_list <filename>       Export global symbols in <filename> in linked output file; any symbols not mentioned will be treated as \"hidden\".
163 filelist
164 Driver RejectNegative Separate
165 Supply a list of objects to be linked from a file, rather than the command line.
167 findirect-virtual-calls
168 Driver RejectNegative
169 Used for generating code for some older kernel revisions.
171 flat_namespace
172 Driver RejectNegative Alias(Zflat_namespace)
173 Ignore the normal two-level namespace; resolve symbols in command line order and do not record which library provided the resolved symbol.
175 force_cpusubtype_ALL
176 Driver RejectNegative Alias(Zforce_cpusubtype_ALL)
177 For the assembler (and linker) permit any architecture sub-variant to be used without error.
179 force_flat_namespace
180 Driver RejectNegative Alias(Zforce_flat_namespace)
181 Set the output object such that, on loading, dyld will ignore any two-level namespace information and resolve symbols in the discovery order for loaded libs.
183 framework
184 Driver RejectNegative Separate
185 -framework <name>       The linker should search for the framework <name> in the framework search path.
187 fterminated-vtables
188 Driver RejectNegative
189 Used for generating code for some older kernel revisions.
191 gfull
192 Driver RejectNegative
193 Abbreviation for \"-g -fno-eliminate-unused-debug-symbols\".
195 gused
196 Driver RejectNegative
197 Abbreviation for \"-g -feliminate-unused-debug-symbols\".
199 headerpad_max_install_names
200 Driver RejectNegative
201 Automatically adds space for longer path names in load commands (up to MAXPATHLEN).
203 image_base
204 Driver RejectNegative Separate Alias(Zimage_base)
205 -image_base <address>   Specify <address> as the base address for a dylib or bundle.
207 init
208 Driver RejectNegative Separate Alias(Zinit)
209 -init <symbol_name>     The symbol <symbol_name> will be used as the first initialiser for a dylib.
211 install_name
212 Driver RejectNegative Separate Alias(Zinstall_name)
213 -install_name <name>    Set the install name for a dylib.
215 keep_private_externs
216 Driver RejectNegative
217 Usually \"private extern\" (hidden) symbols are made local when linking, this command suppresses that such that they remain exported.
219 multi_module
220 Driver RejectNegative Alias(Zmulti_module)
221 (Obsolete after 10.4) Multi modules are ignored at runtime since macOS 10.4.
223 multiply_defined
224 Driver RejectNegative Separate Alias(Zmultiply_defined)
225 (Obsolete after 10.4) -multiply_defined <treatment>     Provided a mechanism for warning about symbols defined in multiple dylibs.
227 multiply_defined_unused
228 Driver 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.
231 no_dead_strip_inits_and_terms
232 Driver RejectNegative Alias(Zno_dead_strip_inits_and_terms)
233 (Obsolete) Current linkers never dead-strip these items, so the option is not needed.
235 nofixprebinding
236 Driver RejectNegative
237 (Obsolete after 10.3.9) Set MH_NOPREFIXBINDING, in an executable.
239 nomultidefs
240 Driver RejectNegative
241 (Obsolete after 10.4)   Set MH_NOMULTIDEFS in an umbrella framework.
243 noprebind
244 Driver RejectNegative Negative(prebind)
245 (Obsolete) LD_PREBIND is no longer supported.
247 noseglinkedit
248 Driver RejectNegative Negative(seglinkedit)
249 (Obsolete) This is the default.
251 object
252 Driver RejectNegative
254 pagezero_size
255 Driver RejectNegative Separate
256 -pagezero_size <size>   Allows setting the page 0 size to 4kb when required.
258 prebind
259 Driver RejectNegative Negative(noprebind)
260 (Obsolete) LD_PREBIND is no longer supported.
262 prebind_all_twolevel_modules
263 Driver RejectNegative
264 (Obsolete) LD_PREBIND is no longer supported.
266 preload
267 Driver RejectNegative
268 Produces a Mach-O file suitable for embedded/ROM use.
270 private_bundle
271 Driver RejectNegative
272 (Obsolete) Allowed linking to proceed with \"-flat_namespace\" when a linked bundle contained a symbol also exported from the main executable.
274 pthread
275 Driver RejectNegative
277 rdynamic
278 Driver RejectNegative
279 Synonym for \"-export-dynamic\" for linker versions that support it.
281 read_only_relocs
282 Driver RejectNegative Separate
283 -read_only_relocs <treatment>   Allow relocations in read-only pages (not recommended).
285 sectalign
286 Driver 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.
289 sectcreate
290 Driver RejectNegative Separate Args(3)
291 -sectcreate <segname> <sectname> <file> Create section <sectname> in segment <segname> from the contents of <file>.
293 sectobjectsymbols
294 Driver RejectNegative Separate Args(2)
295 (Obsolete) -sectobjectsymbols <segname> <sectname>      Setting a local symbol at the start of a section is no longer supported.
297 sectorder
298 Driver RejectNegative Separate Args(3)
299 (Obsolete) -sectorder <segname> <sectname> <orderfile>  Replaced by a more general option \"-order_file\".
301 seg_addr_table
302 Driver 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.
305 ; This is only usable by the ld_classic linker.
306 seg_addr_table_filename
307 Driver RejectNegative Separate Alias(Zfn_seg_addr_table_filename)
308 (Obsolete, ld_classic only) -seg_addr_table_filename <path>.
310 seg1addr
311 Driver RejectNegative Separate
312 Synonym for \"image_base\".
314 segaddr
315 Driver 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).
318 ; This is only usable by the ld_classic linker.
319 segcreate
320 Driver RejectNegative Separate Args(3)
321 (Obsolete, ld_classic only) -sectcreate <segname> <sectname> <file>     Allowed creation of a section from a file.
323 seglinkedit
324 Driver RejectNegative Negative(noseglinkedit)
325 (Obsolete) Object files with LINKEDIT sections are no longer supported.
327 segprot
328 Driver RejectNegative Separate Args(3)
329 -segprot <segname> <max_prot> <init_prot>       The virtual memory protections for segment <segname> have maximum and initial values <max_prot> and <init_prot> respectively.  The specified values may contain \"r\", \"w\", \"x\" or \"-\" the latter meaning \"no access\".
331 segs_read_only_addr
332 Driver RejectNegative Separate Alias(Zsegs_read_only_addr)
333 -segs_read_only_addr <address>  Specify that <address> is the base address of the read-only segments of a dylib.
335 segs_read_write_addr
336 Driver RejectNegative Separate Alias(Zsegs_read_write_addr)
337 -segs_read_write_addr <address> Specify that <address> is the base address address of the read-write segments of a dylib.
339 single_module
340 Driver RejectNegative Alias(Zsingle_module)
341 (Obsolete)      This is the default.
343 sub_library
344 Driver RejectNegative Separate
345 -sub_library <name>     Library named <name> will be re-exported (only useful for dylibs).
347 sub_umbrella
348 Driver RejectNegative Separate
349 -sub_umbrella <name>    Framework named <name> will be re-exported (only useful for dylibs).
351 twolevel_namespace
352 Driver RejectNegative
353 This is the default.
355 twolevel_namespace_hints
356 Driver RejectNegative
357 Add extra information to the executable that can speed up dynamic loading (provided that dependent libraries are unchanged).
359 umbrella
360 Driver RejectNegative Separate Alias(Zumbrella)
361 -umbrella <framework>   The specified framework will be re-exported.
363 undefined
364 Driver RejectNegative Separate
365 -undefined <treatment>  Specify the handling for undefined symbols (default is error).
367 unexported_symbols_list
368 Driver RejectNegative Separate Alias(Zunexported_symbols_list)
369 -unexported_symbols_list <filename>     Do not export the global symbols listed in <filename>.
371 weak_reference_mismatches
372 Driver 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.
375 whatsloaded
376 Driver RejectNegative
377 Logs which object files the linker loads.
379 whyload
380 Driver RejectNegative
381 Logs which symbol(s) caused an object to be loaded.
383 ;(Obsolete, ignored)    Strip symbols starting with "L", this is the default.
385 Driver RejectNegative
388 Driver RejectNegative Joined
389 (Obsolete, ignored)     Old support similar to \"-whyload\".
391 Mach
392 Driver RejectNegative
393 (Obsolete and unhandled by ld64, ignored)       ld should produce an executable (only handled by ld_classic).
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.
398 Zall_load
399 Driver
401 Zallowable_client
402 Driver Separate
404 Zarch_errors_fatal
405 Driver
407 Zbind_at_load
408 Driver
410 Zbundle
411 Driver
413 Zbundle_loader
414 Driver Separate
416 Zdead_strip
417 Driver
419 Zdylib_file
420 Driver Separate
422 Zdynamic
423 Driver
425 Zdynamiclib
426 Driver
428 Zexported_symbols_list
429 Driver Separate
431 Zfn_seg_addr_table_filename
432 Driver Separate
434 Zflat_namespace
435 Driver
437 Zforce_cpusubtype_ALL
438 Driver
440 Zforce_flat_namespace
441 Driver
443 Zimage_base
444 Driver Separate
446 Zinit
447 Driver Separate
449 Zinstall_name
450 Driver Separate
452 Zmulti_module
453 Driver
455 Zmultiply_defined
456 Driver Separate
458 Zmultiplydefinedunused
459 Driver Separate
461 Zno_dead_strip_inits_and_terms
462 Driver
464 Zseg_addr_table
465 Driver Separate
467 Zsegaddr
468 Driver Separate Args(2)
470 Zsegs_read_only_addr
471 Driver Separate
473 Zsegs_read_write_addr
474 Driver Separate
476 Zsingle_module
477 Driver
479 Zumbrella
480 Driver Separate
482 Zunexported_symbols_list
483 Driver Separate
485 Zweak_reference_mismatches
486 Driver Separate