[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Builder compatibility, bug?
From: |
Charles Crain |
Subject: |
Builder compatibility, bug? |
Date: |
Fri, 29 Jun 2001 10:49:24 -0500 |
I am using the LinkedModule command as suggested in the Cons FAQ to "squish"
together object files generated by subordinate Conscripts, so that a
top-level Conscript can eventually find and link them. So for instance, my
top level Conscript might look like:
Export qw( env );
Build( "foo/Conscript",
"bar/Conscript" );
Library $env "foo.cpp",
"bar.cpp",
"objs.o";
...then for instance foo/Conscript (or bar/Conscript) might look like:
Import qw( env );
LinkedModule $env "../objs.o",
"baz.cpp",
"blah.cpp";
As the FAQ suggests, this approach is cool because it allows the top-level
Conscript to be ignorant of the exact set of object files produced by its
subordinates. However, my problem is this: if I try to modify the
construction environment in one of the subordinate Conscripts, like:
Import qw( env );
$env = $env->clone(CPPPATH => [ @{$env->{CPPPATH}},
"#some/include/directory" ]);
LinkedModule $env "../objs.o",
"baz.cpp",
"blah.cpp";
Then I get the following error:
cons: error in file "Conscript":
objs.o
built (at least) two different ways:
Conscript, line 13: cons::Library
foo/Conscript, line 5: cons::LinkedModule
This error goes away if I do not try to modify the construction environment.
What gives? As I understand the error, it is only supposed to pop up if I
am trying to build objs.o with two incompatible builders, but I am only
building it with LinkedModule. Library is not building objs.o; it is using
it. Is this a bug?
Thanks,
Charles
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Builder compatibility, bug?,
Charles Crain <=