Skip to content

Commit d1f2c9b

Browse files
committed
Add documentation for FCC_OVERRIDE_OPTIONS.
1 parent 5d20af4 commit d1f2c9b

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

flang/docs/FlangDriver.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -614,3 +614,28 @@ nvfortran defines `-fast` as
614614
- `-Mcache_align`: there is no equivalent flag in Flang or Clang.
615615
- `-Mflushz`: flush-to-zero mode - when `-ffast-math` is specified, Flang will
616616
link to `crtfastmath.o` to ensure denormal numbers are flushed to zero.
617+
618+
619+
## FCC_OVERRIDE_OPTIONS
620+
621+
The environment variable `FCC_OVERRIDE_OPTIONS` can be used to apply a list of
622+
edits to the input argument lists. The value of this environment variable is
623+
a space separated list of edits to perform. These edits are applied in order to
624+
the input argument lists. Edits should be one of the following forms:
625+
626+
- `#`: Silence information about the changes to the command line arguments.
627+
628+
- `^FOO`: Add `FOO` as a new argument at the beginning of the command line.
629+
630+
- `+FOO`: Add `FOO` as a new argument at the end of the command line.
631+
632+
- `s/XXX/YYY/`: Substitute the regular expression `XXX` with `YYY` in the
633+
command line.
634+
635+
- `xOPTION`: Removes all instances of the literal argument `OPTION`.
636+
637+
- `XOPTION`: Removes all instances of the literal argument `OPTION`, and the
638+
following argument.
639+
640+
- `Ox`: Removes all flags matching `O` or `O[sz0-9]` and adds `Ox` at the end
641+
of the command line.

0 commit comments

Comments
 (0)