Commit Graph

17 Commits

Author SHA1 Message Date
Duncan P. N. Exon Smith c9073fa806 Driver: Remove support for -fobjc-gc*
As a first step toward removing Objective-C garbage collection from
Clang, remove support from the driver.  I'm hoping this will flush out
any expected bots/configurations/whatever that might rely on it.

I've left the options behind temporarily in -cc1 to keep tests passing.
I'll kill them off entirely in a follow up when I've had a chance to
update/delete the rest of Clang.

llvm-svn: 288872
2016-12-07 00:31:10 +00:00
Sylvestre Ledru d340ccc88a Add a new optimization option -Og
Summary:
Just like gcc, we should have the -Og option as more and more software are using it:
https://llvm.org/bugs/show_bug.cgi?id=20765

Reviewers: echristo, dberlin, dblaikie, keith.walker.arm, rengolin

Subscribers: aprantl, friss, mehdi_amini, RKSimon, probinson, majnemer, cfe-commits

Differential Revision: https://reviews.llvm.org/D24998

llvm-svn: 286602
2016-11-11 17:29:56 +00:00
Michal Gorny 7cfe480122 [Driver] Make -print-libgcc-file-name print compiler-rt lib when used
Make the -print-libgcc-file-name option print an appropriate compiler
runtime library, that is libgcc.a if gcc runtime is used
and an appropriate compiler-rt library if that runtime is used.

The main use for this is to allow linking executables built with
-nodefaultlibs (e.g. to avoid linking to the standard C++ library) to
the compiler runtime library, e.g. using:

  clang++ ... -nodefaultlibs $(clang++ ... -print-libgcc-file-name)

in which case currently a program built like this linked to the gcc
runtime unconditionally. The patch fixes it to use compiler-rt libraries
instead when compiler-rt is the active runtime.

Differential Revision: https://reviews.llvm.org/D25338

llvm-svn: 283746
2016-10-10 12:23:40 +00:00
Michal Gorny 822629db5d Revert r283572 - [Driver] Make -print-libgcc-file-name print compiler-rt lib when used
Revert the -print-libgcc-file-name change as the new test fails
on Darwin. It needs to be updated to run the libgcc part only on systems
supporting that rtlib.

llvm-svn: 283586
2016-10-07 20:04:00 +00:00
Michal Gorny 81684a0676 [Driver] Make -print-libgcc-file-name print compiler-rt lib when used
Make the -print-libgcc-file-name option print an appropriate compiler
runtime library, that is libgcc.a if gcc runtime is used
and an appropriate compiler-rt library if that runtime is used.

The main use for this is to allow linking executables built with
-nodefaultlibs (e.g. to avoid linking to the standard C++ library) to
the compiler runtime library, e.g. using:

  clang++ ... -nodefaultlibs $(clang++ ... -print-libgcc-file-name)

in which case currently a program built like this linked to the gcc
runtime unconditionally. The patch fixes it to use compiler-rt libraries
instead when compiler-rt is the active runtime.

Differential Revision: https://reviews.llvm.org/D25338

llvm-svn: 283572
2016-10-07 17:08:06 +00:00
Aaron Ballman 7482e596d5 Silencing a Sphinx diagnostic with options, again.
Warning, treated as error:
/opt/llvm/build.attributes.src/tools/clang/docs/CommandGuide/clang.rst:413: WARNING: unknown option: -save-stats=cwd

llvm-svn: 282484
2016-09-27 12:17:05 +00:00
Matthias Braun abb6eea19c CC1: Add -save-stats option
This option behaves in a similar spirit as -save-temps and writes
internal llvm statistics in json format to a file.

Differential Revision: https://reviews.llvm.org/D24820

llvm-svn: 282426
2016-09-26 18:53:34 +00:00
Teresa Johnson 14142bfc72 Third attempt to fix Sphinx bot
Bot now complaining about -flto=thin reference, used similar workaround
for that failure.

llvm-svn: 282154
2016-09-22 13:58:33 +00:00
Teresa Johnson 9e05266dcb Second attempt to fix Sphinx bot
The fix in r282148 was not enough to fix the following error:
/home/llvmbb/llvm-build-dir/clang-sphinx-docs/llvm/src/tools/clang/docs/CommandGuide/clang.rst:338:
WARNING: unknown option: -flto=full

on the sphinx bot:
  http://lab.llvm.org:8011/builders/clang-sphinx-docs/builds/16313

(not reproducible locally).

This time, simply remove the option reference.

llvm-svn: 282151
2016-09-22 13:41:10 +00:00
Aaron Ballman 9bd12f4b3a Fixing sphinx build due to diagnostic:
/opt/llvm/build.attributes.src/tools/clang/docs/CommandGuide/clang.rst:338: WARNING: unknown option: -flto=full

llvm-svn: 282148
2016-09-22 12:15:18 +00:00
Teresa Johnson 8de63464b8 [docs] Add ThinLTO user documentation
Summary: Add some user facing documentation on ThinLTO and how to use it.

Reviewers: mehdi_amini

Subscribers: mehdi_amini, cfe-commits

Differential Revision: https://reviews.llvm.org/D24806

llvm-svn: 282089
2016-09-21 16:57:03 +00:00
Jonas Hahnfeld 79e00930e2 Document option '-rtlib' in clang's man page and help info
This patch adds an entry for "-rtlib" in the output of `man clang` and `clang -help`.

Patch by Lei Zhang!

Differential Revision: https://reviews.llvm.org/D24069

llvm-svn: 281440
2016-09-14 05:52:21 +00:00
Adrian Prantl 59a6e24d8d [man page] Document -gline-tables-only in the clang man page.
llvm-svn: 275076
2016-07-11 17:03:16 +00:00
Adrian Prantl 6e7300bdd0 [man page] Fix two sphinx build errors.
These options were referenced by other paragraphs, but never specified.

llvm-svn: 275075
2016-07-11 17:03:13 +00:00
Adrian Prantl a7f56ab893 Document that we recommend to turn off -gmodules when building a static
library for distribution to other machines on the clang man page.

llvm-svn: 256287
2015-12-22 22:37:22 +00:00
Adrian Prantl 6b21ab21d1 Add a -gmodules option to the driver and a -dwarf-ext-refs to cc1
to enable the use of external type references in the debug info
(a.k.a. module debugging).

The driver expands -gmodules to "-g -fmodule-format=obj -dwarf-ext-refs"
and passes that to cc1. All this does at the moment is set a flag
codegenopts.

http://reviews.llvm.org/D11958

llvm-svn: 246192
2015-08-27 19:46:20 +00:00
Andrew Wilkins 6238c6f09a Sphinx-based clang man pages
Summary:
This diff introduces .rst files, Sphinx config, and a CMake target
for building clang man pages. This will deprecate the existing .pod-
based man page, and will integrate nicely with CMake. This diff does
not remove the existing man page; that will be done in a follow-up
once packagers have had a chance to react to the change.

For now, only clang(1) has been done; others can be added over time
by dropping additional files into the docs/CommandGuide directory.
The index page for CommandGuide has been copied from LLVM's
docs/CommandGuide.

The man page itself is mostly the same, with a few minor cosmetic
changes. The only major change is the SYNOPSIS section. I was unable
to get .rst/Sphinx produce the same style as in the existing man page.
Instead, I changed it to match the LLVM tools' relatively simple style.

To build the man pages, use the "docs-clang-man" target if building
with CMake. Otherwise, use "make -f Makefile.sphinx man".

Reviewers: cmatthews, silvas

Subscribers: dim, gaeke, beanz, cfe-commits

Differential Revision: http://reviews.llvm.org/D10562

llvm-svn: 241037
2015-06-30 02:52:38 +00:00