Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
C
capnproto
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
capnproto
Commits
f7c5cc2e
Commit
f7c5cc2e
authored
Mar 14, 2015
by
David Renshaw
Committed by
Kenton Varda
Apr 10, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Hardcode /bin/cat output option for `capnp compile`.
parent
ef67b411
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
2 deletions
+9
-2
capnp.c++
c++/src/capnp/compiler/capnp.c++
+9
-2
No files found.
c++/src/capnp/compiler/capnp.c++
View file @
f7c5cc2e
...
@@ -243,10 +243,12 @@ public:
...
@@ -243,10 +243,12 @@ public:
builder
.
addOptionWithArg
({
'o'
,
"output"
},
KJ_BIND_METHOD
(
*
this
,
addOutput
),
"<lang>[:<dir>]"
,
builder
.
addOptionWithArg
({
'o'
,
"output"
},
KJ_BIND_METHOD
(
*
this
,
addOutput
),
"<lang>[:<dir>]"
,
"Generate source code for language <lang> in directory <dir> "
"Generate source code for language <lang> in directory <dir> "
"(default: current directory). <lang> actually specifies a plugin "
"(default: current directory). <lang> actually specifies a plugin "
"to use. If <lang> is a simple word, the compiler for a plugin "
"to use. If <lang> is a simple word, the compiler
searches
for a plugin "
"called 'capnpc-<lang>' in $PATH. If <lang> is a file path "
"called 'capnpc-<lang>' in $PATH. If <lang> is a file path "
"containing slashes, it is interpreted as the exact plugin "
"containing slashes, it is interpreted as the exact plugin "
"executable file name, and $PATH is not searched."
)
"executable file name, and $PATH is not searched. The special case of "
"'/bin/cat' is hardcoded to dump the request to standard output, as "
"this is a common operation and /bin/cat is not available on all systems."
)
.
addOptionWithArg
({
"src-prefix"
},
KJ_BIND_METHOD
(
*
this
,
addSourcePrefix
),
"<prefix>"
,
.
addOptionWithArg
({
"src-prefix"
},
KJ_BIND_METHOD
(
*
this
,
addSourcePrefix
),
"<prefix>"
,
"If a file specified for compilation starts with <prefix>, remove "
"If a file specified for compilation starts with <prefix>, remove "
"the prefix for the purpose of deciding the names of output files. "
"the prefix for the purpose of deciding the names of output files. "
...
@@ -441,6 +443,11 @@ public:
...
@@ -441,6 +443,11 @@ public:
}
}
for
(
auto
&
output
:
outputs
)
{
for
(
auto
&
output
:
outputs
)
{
if
(
kj
::
str
(
output
.
name
)
==
"/bin/cat"
)
{
writeMessageToFd
(
STDOUT_FILENO
,
message
);
continue
;
}
int
pipeFds
[
2
];
int
pipeFds
[
2
];
KJ_SYSCALL
(
pipe
(
pipeFds
));
KJ_SYSCALL
(
pipe
(
pipeFds
));
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment