add lite mode for compiler
This commit is contained in:
parent
6b8898c27b
commit
0283fc5c2d
2 changed files with 5 additions and 3 deletions
|
@ -335,6 +335,9 @@ private:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
case schema::Type::INTERFACE: {
|
case schema::Type::INTERFACE: {
|
||||||
|
if (liteMode) {
|
||||||
|
return kj::strTree("org.capnproto.Capability.", suffix);
|
||||||
|
}
|
||||||
auto interfaceSchema = type.asInterface();
|
auto interfaceSchema = type.asInterface();
|
||||||
if (interfaceSchema.getProto().getIsGeneric()) {
|
if (interfaceSchema.getProto().getIsGeneric()) {
|
||||||
auto typeArgs = getTypeArguments(interfaceSchema, interfaceSchema, kj::str(suffix));
|
auto typeArgs = getTypeArguments(interfaceSchema, interfaceSchema, kj::str(suffix));
|
||||||
|
@ -2516,7 +2519,7 @@ private:
|
||||||
|
|
||||||
kj::MainBuilder::Validity run() {
|
kj::MainBuilder::Validity run() {
|
||||||
|
|
||||||
if (context.getProgramName().endsWith("lite")) {
|
if (::getenv("CAPNP_LITE") != nullptr) {
|
||||||
liteMode = true;
|
liteMode = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
3
gen
3
gen
|
@ -5,11 +5,10 @@ set -eux
|
||||||
export PATH=/usr/local/bin:/usr/bin:/bin
|
export PATH=/usr/local/bin:/usr/bin:/bin
|
||||||
|
|
||||||
make CXX=g++-8 capnpc-java
|
make CXX=g++-8 capnpc-java
|
||||||
cp capnpc-java capnpc-java-lite
|
|
||||||
|
|
||||||
capnp compile -I./compiler/src/main/schema/ -o/bin/cat ./runtime/src/test/schema/test.capnp > ./runtime/src/test/schema/test.raw
|
capnp compile -I./compiler/src/main/schema/ -o/bin/cat ./runtime/src/test/schema/test.capnp > ./runtime/src/test/schema/test.raw
|
||||||
capnp compile -I./compiler/src/main/schema/ -oc++ ./runtime/src/test/schema/test.capnp
|
capnp compile -I./compiler/src/main/schema/ -oc++ ./runtime/src/test/schema/test.capnp
|
||||||
capnp compile -I./compiler/src/main/schema/ -o./capnpc-java-lite ./runtime/src/test/schema/test.capnp
|
env CAPNP_LITE=1 capnp compile -I./compiler/src/main/schema/ -o./capnpc-java ./runtime/src/test/schema/test.capnp
|
||||||
cp ./runtime/src/test/schema/Test.java ./runtime/src/test/schema/TestLite.java
|
cp ./runtime/src/test/schema/Test.java ./runtime/src/test/schema/TestLite.java
|
||||||
capnp compile -I./compiler/src/main/schema/ -o./capnpc-java ./runtime/src/test/schema/test.capnp
|
capnp compile -I./compiler/src/main/schema/ -o./capnpc-java ./runtime/src/test/schema/test.capnp
|
||||||
#cp ./runtime/src/test/schema/Test.java ./runtime/src/test/java/org/capnproto/test/
|
#cp ./runtime/src/test/schema/Test.java ./runtime/src/test/java/org/capnproto/test/
|
||||||
|
|
Loading…
Reference in a new issue