Lines Matching +full:gcc +full:- +full:4
20 interface which is compatible with the gcc driver.
28 GCC Compatibility
29 -----------------
33 call GCC. Although this makes the driver much more complicated than
35 the gcc command line interface was worth it in order to allow users to
39 --------
47 can be used to build other tools which want to implement or accept a gcc
51 ------------
54 found that the gcc driver by itself incurred a small but meaningful
59 - Avoid memory allocation and string copying when possible.
60 - Don't parse arguments more than once.
61 - Provide a few simple interfaces for efficiently searching arguments.
64 ------
68 gcc driver adds a significant amount of complexity. However, the design
81 ----------------------
84 completely subsume the functionality of the gcc executable; that is, the
85 driver should not need to delegate to gcc to perform subtasks. On
86 Darwin, this implies that the Clang driver also subsumes the gcc
87 driver-driver, which is used to implement support for building universal
94 ---------------
107 -------------
116 classes of options through (like ``-Wl,``).
125 For example, a command line like "-Ifoo -I foo" would parse to two
141 ``-###`` flag (which must precede any actual command
144 .. code-block:: console
146 $ clang -### -Xarch_i386 -fomit-frame-pointer -Wa,-fast -Ifoo -I foo t.c
147 Option 0 - Name: "-Xarch_", Values: {"i386", "-fomit-frame-pointer"}
148 Option 1 - Name: "-Wa,", Values: {"-fast"}
149 Option 2 - Name: "-I", Values: {"foo"}
150 Option 3 - Name: "-I", Values: {"foo"}
151 Option 4 - Name: "<input>", Values: {"t.c"}
165 or more top-level actions, each of which generally corresponds to a
175 ``-ccc-print-phases`` flag. For example:
177 .. code-block:: console
179 $ clang -ccc-print-phases -x c t.c -x assembler t.s
181 1: preprocessor, {0}, cpp-output
184 4: input, "t.s", assembler
185 5: assembler, {4}, object
197 .. code-block:: console
199 $ clang -ccc-print-phases -c -arch i386 -arch x86_64 t0.c t1.c
201 1: preprocessor, {0}, cpp-output
204 4: bind-arch, "i386", {3}, object
205 5: bind-arch, "x86_64", {3}, object
206 6: lipo, {4, 5}, object
208 8: preprocessor, {7}, cpp-output
211 11: bind-arch, "i386", {10}, object
212 12: bind-arch, "x86_64", {10}, object
217 intermediate or final outputs (in some cases, like ``-fsyntax-only``,
236 options such as ``-save-temps``).
246 can print the results via the ``-ccc-print-bindings`` option. For
249 .. code-block:: console
251 $ clang -ccc-print-bindings -arch i386 -arch ppc t0.c
252 # "i386-apple-darwin9" - "clang", inputs: ["t0.c"], output: "/tmp/cc-Sn4RKF.s"
253 …# "i386-apple-darwin9" - "darwin::Assemble", inputs: ["/tmp/cc-Sn4RKF.s"], output: "/tmp/cc-gvSnbS…
254 …# "i386-apple-darwin9" - "darwin::Link", inputs: ["/tmp/cc-gvSnbS.o"], output: "/tmp/cc-jgHQxi.out"
255 # "ppc-apple-darwin9" - "gcc::Compile", inputs: ["t0.c"], output: "/tmp/cc-Q0bTox.s"
256 … # "ppc-apple-darwin9" - "gcc::Assemble", inputs: ["/tmp/cc-Q0bTox.s"], output: "/tmp/cc-WCdicw.o"
257 … # "ppc-apple-darwin9" - "gcc::Link", inputs: ["/tmp/cc-WCdicw.o"], output: "/tmp/cc-HHBEBh.out"
258 …# "i386-apple-darwin9" - "darwin::Lipo", inputs: ["/tmp/cc-jgHQxi.out", "/tmp/cc-HHBEBh.out"], out…
264 gcc versions of the tools are being used on PowerPC.
270 compilation. The main work is in translating from the gcc style
290 ``-pipe``, ``-pass-exit-codes`` and ``-time``.
293 ----------------
320 In order to match gcc very closely, the clang driver currently allows
323 match gcc easily, it also makes the driver operation much harder to
327 For example, on Darwin ``-gfull`` gets translated into two separate
328 arguments, ``-g`` and ``-fno-eliminate-unused-debug-symbols``. Trying to
329 write Tool logic to do something with ``-gfull`` will not work, because
346 anywhere near all the options that gcc does, and we want to make sure
360 Relation to GCC Driver Concepts
361 -------------------------------
363 For those familiar with the gcc driver, this section provides a brief
364 overview of how things from the gcc driver map to the clang driver.
366 - **Driver Driver**
371 translation is responsible for handling ``-Xarch_``.
373 The one caveat is that this approach requires ``-Xarch_`` not be used
375 ``-S`` as an ``-Xarch_`` argument). The driver attempts to reject
377 ``-Xarch_`` to that end in practice.
383 - **Specs**
391 - **Toolchains**
393 The gcc driver has no direct understanding of tool chains. Each gcc