Permalink
Browse files

Change gptrixie to make castxml/gccxml to output the xml on stdout to…

… not use a file
  • Loading branch information...
Skarsnik committed Feb 2, 2018
1 parent b0528ba commit aba0beb51092db27ac3277b0536e71cbe865cba7
Showing with 6 additions and 5 deletions.
  1. +1 −1 META6.json
  2. +5 −4 bin/gptrixie
@@ -2,7 +2,7 @@
"perl" : "6.*",
"name" : "App::GPTrixie",
"license" : "Artistic-2.0",
"version" : "0.25",
"version" : "0.26",
"description" : "Generate NativeCall code from C headers file",
"authors" : ["Sylvain 'Skarsnik' Colinet <scolinet@gmail.com>"],
"depends" : [ "XML" ],
@@ -208,18 +208,19 @@ sub do-magic($header, @other) {
my %times;
my $t = now;
my $xml-output;
if $CASTXML {
my @arg = '--castxml-gccxml', "-std=$CASTXML_STD", '-o', 'plop.xml', $header, |@other;
my @arg = '--castxml-gccxml', "-std=$CASTXML_STD", '-o', '-', $header, |@other;
gpt-note "Calling castxml : " ~ @arg.join(' ');
run 'castxml', @arg;
$xml-output = run('castxml', @arg, :out).out.slurp;
} else {
gpt-note "Calling GCCXML : $GCC_XML $header -fxml=plop.xml ", |@other;
run $GCC_XML, $header, "-fxml=plop.xml", @other;
$xml-output = run($GCC_XML, $header, "-fxml=-", @other, :out).out.slurp;
}
%times<gccxml> = now - $t;
$t = now;
gpt-note "Parsing the XML file";
my $xml = from-xml-file('plop.xml');
my $xml = from-xml($xml-output);
%times<parse-xml> = now - $t;
$t = now;
gpt-note "Doing magic";

0 comments on commit aba0beb

Please sign in to comment.