]> git.ipfire.org Git - thirdparty/ccache.git/commitdiff
Pass -stdlib= only to preprocessor
authorMatthias Kretz <kretz@kde.org>
Fri, 30 Oct 2015 15:53:37 +0000 (16:53 +0100)
committerJoel Rosdahl <joel@rosdahl.net>
Fri, 30 Oct 2015 16:18:10 +0000 (17:18 +0100)
Clang warns about an unused -stdlib=libc++ argument if the argument is
passed to the second clang invocation. The -stdlib= argument is only
necessary on preprocessing (to set the system include paths) and on
linking (which is not cached anyway)

Signed-off-by: Matthias Kretz <kretz@kde.org>
compopt.c

index e5b3e0a3914cf8726bde94c0169f007db92beba1..86dd416ad275b3c16d1046d1642e1f42798e990b 100644 (file)
--- a/compopt.c
+++ b/compopt.c
@@ -78,6 +78,7 @@ static const struct compopt compopts[] = {
        {"-nostdinc++",     AFFECTS_CPP},
        {"-remap",          AFFECTS_CPP},
        {"-save-temps",     TOO_HARD},
+       {"-stdlib=",        AFFECTS_CPP | TAKES_CONCAT_ARG},
        {"-trigraphs",      AFFECTS_CPP},
        {"-u",              TAKES_ARG},
 };