[cfe-commits] r132629 - in /cfe/trunk: lib/Driver/Tools.cpp test/Driver/nostdlib.c

Galina Kistanova gkistanova at gmail.com
Sat Jun 4 00:20:27 PDT 2011


Hello Nick,

Could you declare the test target-dependent, please?
Like adding
// REQUIRES: x86-registered-target
at the top.

Thanks,
Galina.

On Fri, Jun 3, 2011 at 11:27 PM, Nick Lewycky <nicholas at mxc.ca> wrote:
> Author: nicholas
> Date: Sat Jun  4 01:27:06 2011
> New Revision: 132629
>
> URL: http://llvm.org/viewvc/llvm-project?rev=132629&view=rev
> Log:
> On linux, -nostdlib was causing a --start-group with no --end-group to be passed
> to the linker.
>
> Added:
>    cfe/trunk/test/Driver/nostdlib.c
> Modified:
>    cfe/trunk/lib/Driver/Tools.cpp
>
> Modified: cfe/trunk/lib/Driver/Tools.cpp
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/Tools.cpp?rev=132629&r1=132628&r2=132629&view=diff
> ==============================================================================
> --- cfe/trunk/lib/Driver/Tools.cpp (original)
> +++ cfe/trunk/lib/Driver/Tools.cpp Sat Jun  4 01:27:06 2011
> @@ -3945,10 +3945,10 @@
>     CmdArgs.push_back("-lm");
>   }
>
> -  if (Args.hasArg(options::OPT_static))
> -    CmdArgs.push_back("--start-group");
> -
>   if (!Args.hasArg(options::OPT_nostdlib)) {
> +    if (Args.hasArg(options::OPT_static))
> +      CmdArgs.push_back("--start-group");
> +
>     if (!D.CCCIsCXX)
>       CmdArgs.push_back("-lgcc");
>
>
> Added: cfe/trunk/test/Driver/nostdlib.c
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/nostdlib.c?rev=132629&view=auto
> ==============================================================================
> --- cfe/trunk/test/Driver/nostdlib.c (added)
> +++ cfe/trunk/test/Driver/nostdlib.c Sat Jun  4 01:27:06 2011
> @@ -0,0 +1,4 @@
> +// RUN: %clang -ccc-host-triple i686-pc-linux-gnu -### -nostdlib %s 2> %t
> +// RUN: FileCheck < %t %s
> +//
> +// CHECK-NOT: start-group
>
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
>




More information about the cfe-commits mailing list