mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-23 13:01:45 +02:00
* Allow to build stub
This commit is contained in:
parent
a9c88ace25
commit
4664b14081
@ -18,17 +18,19 @@ program webidl2pas;
|
|||||||
|
|
||||||
uses
|
uses
|
||||||
Classes, SysUtils, CustApp, webidlscanner, webidltopas, pascodegen, typinfo,
|
Classes, SysUtils, CustApp, webidlscanner, webidltopas, pascodegen, typinfo,
|
||||||
webidltopas2js, webidltowasmjob;
|
webidltopas2js, webidltowasmjob, webidltowasmstub;
|
||||||
|
|
||||||
type
|
type
|
||||||
TWebIDLToPasFormat = (
|
TWebIDLToPasFormat = (
|
||||||
wifPas2js,
|
wifPas2js,
|
||||||
wifWasmJob
|
wifWasmJob,
|
||||||
|
wifWasmJobStub
|
||||||
);
|
);
|
||||||
const
|
const
|
||||||
WebIDLToPasFormatNames: array[TWebIDLToPasFormat] of string = (
|
WebIDLToPasFormatNames: array[TWebIDLToPasFormat] of string = (
|
||||||
'pas2js',
|
'pas2js',
|
||||||
'wasmjob'
|
'wasmjob',
|
||||||
|
'wasmjobstub'
|
||||||
);
|
);
|
||||||
|
|
||||||
type
|
type
|
||||||
@ -261,6 +263,8 @@ begin
|
|||||||
case OutputFormat of
|
case OutputFormat of
|
||||||
wifWasmJob:
|
wifWasmJob:
|
||||||
FWebIDLToPas:=TWebIDLToPasWasmJob.Create(Self);
|
FWebIDLToPas:=TWebIDLToPasWasmJob.Create(Self);
|
||||||
|
wifWasmJobStub:
|
||||||
|
FWebIDLToPas:=TWebIDLToPasWasmJobStub.Create(Self);
|
||||||
else
|
else
|
||||||
FWebIDLToPas:=TWebIDLToPas2js.Create(Self);
|
FWebIDLToPas:=TWebIDLToPas2js.Create(Self);
|
||||||
end;
|
end;
|
||||||
@ -306,6 +310,7 @@ begin
|
|||||||
Writeln(StdErr,'-o --output=FileName output file. Defaults to unit name with .pas extension appended.');
|
Writeln(StdErr,'-o --output=FileName output file. Defaults to unit name with .pas extension appended.');
|
||||||
Writeln(StdErr,'-p --optionsinheader add options to header of generated file');
|
Writeln(StdErr,'-p --optionsinheader add options to header of generated file');
|
||||||
|
|
||||||
|
Writeln(StdErr,'-s --stub Write a stub implementation for native compilation');
|
||||||
Writeln(StdErr,'-t --typealiases=alias A comma separated list of type aliases in Alias=Name form');
|
Writeln(StdErr,'-t --typealiases=alias A comma separated list of type aliases in Alias=Name form');
|
||||||
Writeln(StdErr,' use @filename to load the aliases from file.');
|
Writeln(StdErr,' use @filename to load the aliases from file.');
|
||||||
Writeln(StdErr,'-u --unitname=Name name for unit. Defaults to input file without extension.');
|
Writeln(StdErr,'-u --unitname=Name name for unit. Defaults to input file without extension.');
|
||||||
|
Loading…
Reference in New Issue
Block a user