mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-15 23:29:13 +02:00
pastojs: test precompile with -Jminclude
git-svn-id: trunk@39771 -
This commit is contained in:
parent
680f6c125b
commit
ffc099be8a
@ -2235,7 +2235,7 @@ begin
|
|||||||
for i:=0 to SrcMap.SourceCount-1 do begin
|
for i:=0 to SrcMap.SourceCount-1 do begin
|
||||||
LocalFilename:=SrcMap.SourceFiles[i];
|
LocalFilename:=SrcMap.SourceFiles[i];
|
||||||
if LocalFilename='' then continue;
|
if LocalFilename='' then continue;
|
||||||
if SrcMapInclude then
|
if SrcMapInclude and DirectoryCache.FileExists(LocalFilename) then
|
||||||
begin
|
begin
|
||||||
// include source in SrcMap
|
// include source in SrcMap
|
||||||
aFile:=FileCache.LoadFile(LocalFilename);
|
aFile:=FileCache.LoadFile(LocalFilename);
|
||||||
@ -2314,6 +2314,7 @@ var
|
|||||||
SrcMap.Options:=SrcMap.Options+[smoSafetyHeader]
|
SrcMap.Options:=SrcMap.Options+[smoSafetyHeader]
|
||||||
else
|
else
|
||||||
SrcMap.Options:=SrcMap.Options-[smoSafetyHeader];
|
SrcMap.Options:=SrcMap.Options-[smoSafetyHeader];
|
||||||
|
SrcMap.Options:=SrcMap.Options+[smoAllowSrcLine0];
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
@ -102,7 +102,7 @@ begin
|
|||||||
Params.Assign(SharedParams);
|
Params.Assign(SharedParams);
|
||||||
if FirstRunParams<>nil then
|
if FirstRunParams<>nil then
|
||||||
Params.AddStrings(FirstRunParams);
|
Params.AddStrings(FirstRunParams);
|
||||||
Compile([MainFile,'-Jc','-Fu'+UnitPaths,'-JU'+PCUFormat.Ext,'-FU'+UnitOutputDir]);
|
Compile([MainFile,'-Jc','-Fu'+UnitPaths,'-JU'+PCUFormat.Ext,'-FU'+UnitOutputDir,'-Jminclude']);
|
||||||
AssertFileExists(UnitOutputDir+'/system.'+PCUFormat.Ext);
|
AssertFileExists(UnitOutputDir+'/system.'+PCUFormat.Ext);
|
||||||
JSFilename:=UnitOutputDir+PathDelim+ExtractFilenameOnly(MainFile)+'.js';
|
JSFilename:=UnitOutputDir+PathDelim+ExtractFilenameOnly(MainFile)+'.js';
|
||||||
AssertFileExists(JSFilename);
|
AssertFileExists(JSFilename);
|
||||||
@ -119,7 +119,7 @@ begin
|
|||||||
Params.Assign(SharedParams);
|
Params.Assign(SharedParams);
|
||||||
if SecondRunParams<>nil then
|
if SecondRunParams<>nil then
|
||||||
Params.AddStrings(SecondRunParams);
|
Params.AddStrings(SecondRunParams);
|
||||||
Compile([MainFile,'-Jc','-FU'+UnitOutputDir],ExpExitCode);
|
Compile([MainFile,'-Jc','-FU'+UnitOutputDir,'-Jminclude'],ExpExitCode);
|
||||||
if ExpExitCode=0 then
|
if ExpExitCode=0 then
|
||||||
begin
|
begin
|
||||||
NewSrc:=JSFile.Source;
|
NewSrc:=JSFile.Source;
|
||||||
|
Loading…
Reference in New Issue
Block a user