[PATCH] Disable EHABI when -fno-exceptions option is chosen.
Keith Walker
kwalker at arm.com
Fri Jan 31 05:59:59 PST 2014
Renato,
See comments below ...
> -----Original Message-----
> From: Renato Golin [mailto:renato.golin at linaro.org]
> Sent: 31 January 2014 12:38
> To: samsonov at google.com; rnk at google.com; Keith Walker;
> t.p.northover at gmail.com
> Cc: cfe-commits at cs.uiuc.edu; joey.gouly at gmail.com
> Subject: Re: [PATCH] Disable EHABI when -fno-exceptions option is
> chosen.
>
> Simpler check (thanks Joey) and test.
>
> Hi samsonov, rnk, keith.walker.arm,
>
> http://llvm-reviews.chandlerc.com/D2666
>
> CHANGE SINCE LAST DIFF
> http://llvm-reviews.chandlerc.com/D2666?vs=6792&id=6794#toc
>
> Files:
> lib/Driver/Tools.cpp
> test/Driver/arm-no-exception.c
>
> Index: lib/Driver/Tools.cpp
> ===================================================================
> --- lib/Driver/Tools.cpp
> +++ lib/Driver/Tools.cpp
> @@ -830,6 +830,10 @@
> CmdArgs.push_back("-backend-option");
> CmdArgs.push_back("-arm-reserve-r9");
> }
> +
> + // Exception handling
> + if (Args.hasArg(options::OPT_fno_exceptions))
I think there should be a call to CmdArgs.push_back("-backend-option") here
> + CmdArgs.push_back("-arm-disable-ehabi");
> }
>
> // Get CPU and ABI names. They are not independent
> Index: test/Driver/arm-no-exception.c
> ===================================================================
> --- /dev/null
> +++ test/Driver/arm-no-exception.c
> @@ -0,0 +1,4 @@
> +// RUN: %clang -target arm-none-gnueeabi -fno-exceptions -### %s 2> %t
> +// RUN: FileCheck --check-prefix=CHECK-NOEH < %t %s
> +
> +// CHECK-NOEH: "-arm-disable-ehabi"
So also update expected test result.
Otherwise looks good to me.
Keith
More information about the cfe-commits
mailing list