Debian Codegraph @

gcc/config/darwin.opt

raw
1 ; Processor-independent options for Darwin.
2
3 ; Copyright (C) 2005-2025 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
29 dependency-file
30 C ObjC C++ ObjC++ Separate Alias(MF) MissingArgError(missing filename after %qs)
31
32 fapple-kext
33 Target C++ Var(flag_apple_kext)
34 Generate code for darwin loadable kernel extensions.
35
36 fconstant-cfstrings
37 ObjC ObjC++ Alias(mconstant-cfstrings)
38 Generate compile-time CFString objects.
39
40 iframework
41 Target RejectNegative C ObjC C++ ObjC++ Joined Separate
42 -iframework <dir> Add <dir> to the end of the system framework include path.
43
44 mconstant-cfstrings
45 Target Var(darwin_constant_cfstrings) Init(1)
46 Generate compile-time CFString objects.
47
48 Wnonportable-cfstrings
49 Target Var(darwin_warn_nonportable_cfstrings) Init(1) Warning
50 Warn if constant CFString objects contain non-portable characters.
51
52 ; Use new-style pic stubs if this is true, x86 only so far.
53 matt-stubs
54 Target Var(darwin_macho_att_stub) Init(1)
55 Generate AT&T-style stubs for Mach-O.
56
57 mdynamic-no-pic
58 Target Common Mask(MACHO_DYNAMIC_NO_PIC)
59 Generate code suitable for executables (NOT shared libs).
60
61 mfix-and-continue
62 Target Var(darwin_fix_and_continue)
63 Generate code suitable for fast turn around debugging.
64
65 mkernel
66 Target Var(flag_mkernel)
67 Generate code for the kernel or loadable kernel extensions.
68
69 ; The Init here is for the convenience of GCC developers, so that cc1
70 ; and cc1plus don't crash if no -mmacosx-version-min is passed. The
71 ; driver will always pass a -mmacosx-version-min, so in normal use the
72 ; Init is never used.
73 mmacosx-version-min=
74 Target RejectNegative Joined Var(darwin_macosx_version_min) Init(DEF_MIN_OSX_VERSION)
75 The earliest macOS version on which this program will run.
76
77 ; Really, only relevant to PowerPC which has a 4 byte bool by default.
78 mone-byte-bool
79 Target RejectNegative Var(darwin_one_byte_bool)
80 Set sizeof(bool) to 1.
81
82 msymbol-stubs
83 Target Var(darwin_symbol_stubs) Init(0)
84 Force generation of external symbol indirection stubs.
85
86 ; Some code-gen may be improved / adjusted if the linker is sufficiently modern.
87 mtarget-linker=
88 Target RejectNegative Joined Alias(mtarget-linker)
89
90 mtarget-linker
91 Target RejectNegative Joined Separate Var(darwin_target_linker) Init(LD64_VERSION)
92 -mtarget-linker <version> Specify that ld64 <version> is the toolchain linker for the current invocation.
93
94 ; Driver options.
95
96 all_load
97 Driver RejectNegative
98 Load all members of archive libraries, rather than only those that satisfy undefined symbols.
99
100 allowable_client
101 Driver RejectNegative Separate
102 -allowable_client <name> The output dylib is private to the client <name>.
103
104 arch
105 Driver RejectNegative Separate
106 -arch <name> Generate output for architecture <name>.
107
108 arch_errors_fatal
109 Driver RejectNegative
110 Mismatches between file architecture and one specified by \"-arch\" are errors instead of warnings.
111
112 asm_macosx_version_min=
113 Driver RejectNegative Joined
114 The earliest macOS version on which this program will run (formatted for the assembler).
115
116 bind_at_load
117 Driver RejectNegative
118 Generate an output executable that binds symbols on load, rather than lazily.
119
120 bundle
121 Driver RejectNegative
122 Generate a Mach-O bundle (file type MH_BUNDLE).
123
124 bundle_loader
125 Driver RejectNegative Separate
126 -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.
127
128 client_name
129 Driver RejectNegative Separate
130 -client_name <name> Enable the executable being built to link against a private dylib (using allowable_client).
131
132 compatibility_version
133 Driver RejectNegative Separate
134 -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.
135
136 current_version
137 Driver RejectNegative Separate
138 -current_version <number> Set the current version for the library to <number>.
139
140 dead_strip
141 Driver RejectNegative
142 Remove code and data that is unreachable from any exported symbol (including the entry point).
143
144 dylib_file
145 Driver RejectNegative Separate
146 -dylib_file install_name:file_name This allows linking of a dylib with \"install_name\" but to be found in a different install position \"file_name\"
147
148 dylinker
149 Driver RejectNegative
150 Produce a Mach-O dylinker (file type MH_DYLINKER), only used for building dyld.
151
152 dylinker_install_name
153 Driver RejectNegative Separate
154 -dylinker_install_name <path> Only used for building dyld.
155
156 dynamic
157 Driver RejectNegative
158 The default (and opposite of -static), implied by user mode executables, shared libraries and bundles.
159
160 dynamiclib
161 Driver RejectNegative
162 Produce a Mach-O shared library (file type MH_DYLIB), synonym for \"-shared\".
163
164 exported_symbols_list
165 Driver RejectNegative Separate
166 -exported_symbols_list <filename> Export global symbols in <filename> in linked output file; any symbols not mentioned will be treated as \"hidden\".
167
168 filelist
169 Driver RejectNegative Separate
170 Supply a list of objects to be linked from a file, rather than the command line.
171
172 findirect-virtual-calls
173 Driver RejectNegative
174 Used for generating code for some older kernel revisions.
175
176 flat_namespace
177 Driver RejectNegative
178 Ignore the normal two-level namespace; resolve symbols in command line order and do not record which library provided the resolved symbol.
179
180 force_cpusubtype_ALL
181 Driver RejectNegative
182 For the assembler (and linker) permit any architecture sub-variant to be used without error.
183
184 force_flat_namespace
185 Driver RejectNegative
186 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.
187
188 framework
189 Driver RejectNegative Separate
190 -framework <name> The linker should search for the framework <name> in the framework search path.
191
192 fterminated-vtables
193 Driver RejectNegative
194 Used for generating code for some older kernel revisions.
195
196 gfull
197 Driver RejectNegative
198 Abbreviation for \"-g -fno-eliminate-unused-debug-symbols\".
199
200 gused
201 Driver RejectNegative
202 Abbreviation for \"-g -feliminate-unused-debug-symbols\".
203
204 headerpad_max_install_names
205 Driver RejectNegative
206 Automatically adds space for longer path names in load commands (up to MAXPATHLEN).
207
208 image_base
209 Driver RejectNegative Separate
210 -image_base <address> Specify <address> as the base address for a dylib or bundle.
211
212 init
213 Driver RejectNegative Separate
214 -init <symbol_name> The symbol <symbol_name> will be used as the first initializer for a dylib.
215
216 install_name
217 Driver RejectNegative Separate
218 -install_name <name> Set the install name for a dylib.
219
220 keep_private_externs
221 Driver RejectNegative
222 Usually \"private extern\" (hidden) symbols are made local when linking, this command suppresses that such that they remain exported.
223
224 multi_module
225 Driver RejectNegative
226 (Obsolete after 10.4) Multi modules are ignored at runtime since macOS 10.4.
227
228 multiply_defined
229 Driver RejectNegative Separate
230 (Obsolete after 10.4) -multiply_defined <treatment> Provided a mechanism for warning about symbols defined in multiple dylibs.
231
232 multiply_defined_unused
233 Driver RejectNegative Separate
234 (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.
235
236 no_dead_strip_inits_and_terms
237 Driver RejectNegative
238 (Obsolete) Current linkers never dead-strip these items, so the option is not needed.
239
240 nodefaultexport
241 Driver RejectNegative
242 Do not add a default symbol exports to modules or dynamic libraries.
243
244 nodefaultrpaths
245 Driver RejectNegative
246 Do not add default run paths (for the compiler library directories) to executables, modules or dynamic libraries.
247
248 nofixprebinding
249 Driver RejectNegative
250 (Obsolete after 10.3.9) Set MH_NOPREFIXBINDING, in an executable.
251
252 nomultidefs
253 Driver RejectNegative
254 (Obsolete after 10.4) Set MH_NOMULTIDEFS in an umbrella framework.
255
256 noprebind
257 Driver RejectNegative Negative(prebind)
258 (Obsolete) LD_PREBIND is no longer supported.
259
260 noseglinkedit
261 Driver RejectNegative Negative(seglinkedit)
262 (Obsolete) This is the default.
263
264 ObjC
265 Driver RejectNegative
266
267 ObjC++
268 Driver RejectNegative
269
270 object
271 Driver RejectNegative
272
273 pagezero_size
274 Driver RejectNegative Separate
275 -pagezero_size <size> Allows setting the page 0 size to 4kb when required.
276
277 prebind
278 Driver RejectNegative Negative(noprebind)
279 (Obsolete) LD_PREBIND is no longer supported.
280
281 prebind_all_twolevel_modules
282 Driver RejectNegative
283 (Obsolete) LD_PREBIND is no longer supported.
284
285 preload
286 Driver RejectNegative
287 Produces a Mach-O file suitable for embedded/ROM use.
288
289 private_bundle
290 Driver RejectNegative
291 (Obsolete) Allowed linking to proceed with \"-flat_namespace\" when a linked bundle contained a symbol also exported from the main executable.
292
293 pthread
294 Driver RejectNegative
295
296 rdynamic
297 Driver RejectNegative
298 Synonym for \"-export-dynamic\" for linker versions that support it.
299
300 read_only_relocs
301 Driver RejectNegative Separate
302 -read_only_relocs <treatment> Allow relocations in read-only pages (not recommended).
303
304 sectalign
305 Driver RejectNegative Separate Args(3)
306 -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.
307
308 sectcreate
309 Driver RejectNegative Separate Args(3)
310 -sectcreate <segname> <sectname> <file> Create section <sectname> in segment <segname> from the contents of <file>.
311
312 sectobjectsymbols
313 Driver RejectNegative Separate Args(2)
314 (Obsolete) -sectobjectsymbols <segname> <sectname> Setting a local symbol at the start of a section is no longer supported.
315
316 sectorder
317 Driver RejectNegative Separate Args(3)
318 (Obsolete) -sectorder <segname> <sectname> <orderfile> Replaced by a more general option \"-order_file\".
319
320 seg_addr_table
321 Driver RejectNegative Separate
322 -seg_addr_table <file> Specify the base addresses for dynamic libraries; <file> contains a line for each library.
323
324 ; This is only usable by the ld_classic linker.
325 seg_addr_table_filename
326 Driver RejectNegative Separate
327 (Obsolete, ld_classic only) -seg_addr_table_filename <path>.
328
329 seg1addr
330 Driver RejectNegative Separate
331 Synonym for \"image_base\".
332
333 segaddr
334 Driver RejectNegative Separate Args(2)
335 -segaddr <name> <address> Set the base address of segment <name> to <address> which must be aligned to a page boundary (currently 4kb).
336
337 ; This is only usable by the ld_classic linker.
338 segcreate
339 Driver RejectNegative Separate Args(3)
340 (Obsolete, ld_classic only) -sectcreate <segname> <sectname> <file> Allowed creation of a section from a file.
341
342 seglinkedit
343 Driver RejectNegative Negative(noseglinkedit)
344 (Obsolete) Object files with LINKEDIT sections are no longer supported.
345
346 segprot
347 Driver RejectNegative Separate Args(3)
348 -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\".
349
350 segs_read_only_addr
351 Driver RejectNegative Separate
352 -segs_read_only_addr <address> Specify that <address> is the base address of the read-only segments of a dylib.
353
354 segs_read_write_addr
355 Driver RejectNegative Separate
356 -segs_read_write_addr <address> Specify that <address> is the base address address of the read-write segments of a dylib.
357
358 single_module
359 Driver RejectNegative
360 (Obsolete) This is the default.
361
362 sub_library
363 Driver RejectNegative Separate
364 -sub_library <name> Library named <name> will be re-exported (only useful for dylibs).
365
366 sub_umbrella
367 Driver RejectNegative Separate
368 -sub_umbrella <name> Framework named <name> will be re-exported (only useful for dylibs).
369
370 twolevel_namespace
371 Driver RejectNegative
372 This is the default.
373
374 twolevel_namespace_hints
375 Driver RejectNegative
376 Add extra information to the executable that can speed up dynamic loading (provided that dependent libraries are unchanged).
377
378 umbrella
379 Driver RejectNegative
380 -umbrella <framework> The specified framework will be re-exported.
381
382 undefined
383 Driver RejectNegative Separate
384 -undefined <treatment> Specify the handling for undefined symbols (default is error).
385
386 unexported_symbols_list
387 Driver RejectNegative Separate
388 -unexported_symbols_list <filename> Do not export the global symbols listed in <filename>.
389
390 weak_framework
391 Driver RejectNegative Separate
392 -weak_framework <framework> Make a weak link to the specified framework.
393
394 weak_reference_mismatches
395 Driver RejectNegative Separate
396 -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.
397
398 whatsloaded
399 Driver RejectNegative
400 Logs which object files the linker loads.
401
402 whyload
403 Driver RejectNegative
404 Logs which symbol(s) caused an object to be loaded.
405
406 ;(Obsolete, ignored) Strip symbols starting with "L", this is the default.
407 X
408 Driver RejectNegative
409
410 y
411 Driver RejectNegative Joined
412 (Obsolete, ignored) Old support similar to \"-whyload\".
413
414 Mach
415 Driver RejectNegative
416 (Obsolete and unhandled by ld64, ignored) ld should produce an executable (only handled by ld_classic).