Boost logo

Boost-Build :

From: David Abrahams (dave_at_[hidden])
Date: 2003-03-05 08:20:33


Vladimir Prus <ghost_at_[hidden]> writes:

> David Abrahams wrote:
>> I'm running into the following two problems, as you can see from the
>> enclosed.
>>
>> The first problem is that I get warnings about unused response-file
>> targets every time I link.
>
> Not quite. The warning in the output you've posted is about unused SHARED_LIB
> target.

why did I think it was the RSP file that was being complained about?
Should something be done to make it clearer?

> You've exe which has lib in sources. When lib is generated, both
> SHARED_LIB and IMPORT_LIB targets are created. The latter is consumed by
> the generator. The former is not, and a warning is issued.

If I'd realized it was the SHARED_LIB I wouldn't have been confused
at all.

> In this case, it's not good. But assume you've just got one of
> sources ignored without a warning. This use case was the motivation
> for the warning: putting LIB in sources for another LIB was ignored
> without a warning.

Yes.

> What is the best solution? Introduce a mechanism to say: "I don't care if this
> target is ignored"? Or request that at least one target from each source
> reference is consumed. E.g in
>
> exe e : e.cpp d ;
>
> if "d" generates two targets, but one of them is consumed, then no warning is
> issues. If none is consumed, you see the warning.

I think that's the right answer. Our heuristic is supposed to choose
the generator path that produces the fewest targets; if that means
some extra targets need to be generated, then so be it.

>> The second is that somehow this flags rule invocation:
>>
>> flags msvc.link .LD $(condition) : $(prefix)$(linker) ;
>>
>> seems to be failing to take effect. It ought to be prepending the
>> setup string:
>>
>> setup = "call \""$(path)\\bin\\$(setup)"\" > nul
>> " ;
>>
>> to the link command, as it does for the compile command.
>
> I cannot reproduce. My local diffs in dependency_test are
>
> --- project-root.jam 1 Oct 2002 16:31:31 -0000 1.1
> +++ project-root.jam 4 Mar 2003 08:24:39 -0000
> @@ -1,3 +1,6 @@
>
> import gcc ;
> import foo ;
> +
> +import toolset : using ;
> +using msvc : 6.5 : /foo/bar ;
>
> When I run
>
> bjam -n msvc-6.5, I get the attached output, which seems to include correct
> preabmble for both compiler and linker. If I say
>
> "using msvc : 6.5 ;"
>
> I get just "cl"/"link".

Ah, but you don't have msvc6 installed in the default location on
that machine, do you? I do, which is why it attempts to use the
setup string.

> If you could send a reproducible example or a recipe
> using CVS, I can look more. While I don't have msvc, "bjam -n" may
> be enough.

Probably not, unless you insert a fake replacement for GLOB that
makes it report the existence of cl.exe

-- 
Dave Abrahams
Boost Consulting
www.boost-consulting.com
 

Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk