diff mbox

[google] save -std to lipo profile (issue5754067)

Message ID 20120309185924.290E7C1614@rong.mtv.corp.google.com
State New
Headers show

Commit Message

Rong Xu March 9, 2012, 6:59 p.m. UTC
Hi,

This patch is for google branches only.

It saves -std=* option to lipo profile so that non-c99 primary module
can include c99 auxiliay modules with restrict keyword.

Tested with bootstrap and google internal benchmarks.

-Rong

2012-03-09   Rong Xu  <xur@google.com>

	* opts-global.c (lipo_save_cl_args): save -std option.
        Google ref b/6117980.


--
This patch is available for review at http://codereview.appspot.com/5754067

Comments

Xinliang David Li March 9, 2012, 7:39 p.m. UTC | #1
ok for google branches.

David

On Fri, Mar 9, 2012 at 10:59 AM, Rong Xu <xur@google.com> wrote:
> Hi,
>
> This patch is for google branches only.
>
> It saves -std=* option to lipo profile so that non-c99 primary module
> can include c99 auxiliay modules with restrict keyword.
>
> Tested with bootstrap and google internal benchmarks.
>
> -Rong
>
> 2012-03-09   Rong Xu  <xur@google.com>
>
>        * opts-global.c (lipo_save_cl_args): save -std option.
>        Google ref b/6117980.
>
> Index: opts-global.c
> ===================================================================
> --- opts-global.c       (revision 185148)
> +++ opts-global.c       (working copy)
> @@ -210,10 +210,12 @@
>      (3) -W...
>      (4) -O...
>      (5) --param...
> +     (6) -std=... (-std=c99 for restrict keyword)
>   */
>   if (opt[0] == '-'
>       && (opt[1] == 'f' || opt[1] == 'm' || opt[1] == 'W' || opt[1] == 'O'
> -         || (strstr (opt, "--param") == opt))
> +         || (strstr (opt, "--param") == opt)
> +         || (strstr (opt, "-std=")))
>       && !strstr(opt, "-frandom-seed")
>       && !strstr(opt, "-fripa-disallow-opt-mismatch")
>       && !strstr(opt, "-Wripa-opt-mismatch"))
>
> --
> This patch is available for review at http://codereview.appspot.com/5754067
diff mbox

Patch

Index: opts-global.c
===================================================================
--- opts-global.c	(revision 185148)
+++ opts-global.c	(working copy)
@@ -210,10 +210,12 @@ 
      (3) -W...
      (4) -O...
      (5) --param...
+     (6) -std=... (-std=c99 for restrict keyword)
   */
   if (opt[0] == '-'
       && (opt[1] == 'f' || opt[1] == 'm' || opt[1] == 'W' || opt[1] == 'O'
-	  || (strstr (opt, "--param") == opt))
+	  || (strstr (opt, "--param") == opt)
+	  || (strstr (opt, "-std=")))
       && !strstr(opt, "-frandom-seed")
       && !strstr(opt, "-fripa-disallow-opt-mismatch")
       && !strstr(opt, "-Wripa-opt-mismatch"))