]> git.ipfire.org Git - thirdparty/ccache.git/commitdiff
Support -@file.opt
authorOrgad Shaneh <orgad.shaneh@audiocodes.com>
Thu, 9 May 2013 05:37:14 +0000 (08:37 +0300)
committerJoel Rosdahl <joel@rosdahl.net>
Fri, 30 Aug 2013 20:37:52 +0000 (22:37 +0200)
Some compilers (e.g. diab) use -@ notation for options file

ccache.c

index ada3edfadf5f0430bf4db6755e17dbe67af03308..fd3d41d30ecc50107b4a90c5630152266daff383 100644 (file)
--- a/ccache.c
+++ b/ccache.c
@@ -1686,10 +1686,13 @@ cc_process_args(struct args *args, struct args **preprocessor_args,
                }
 
                /* Handle "@file" argument. */
-               if (str_startswith(argv[i], "@")) {
+               if (str_startswith(argv[i], "@") || str_startswith(argv[i], "-@")) {
                        char *argpath = argv[i] + 1;
                        struct args *file_args;
 
+                       if (argpath[-1] == '-') {
+                               ++argpath;
+                       }
                        file_args = args_init_from_gcc_atfile(argpath);
                        if (!file_args) {
                                cc_log("Couldn't read arg file %s", argpath);