mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-12 14:09:31 +02:00
lazbuild: -q -q passes -vw-n-h-i-l-d-u-t-p-c-x- to the compiler
git-svn-id: trunk@48698 -
This commit is contained in:
parent
894fe3d7d4
commit
a96cfe9231
@ -52,7 +52,7 @@ uses
|
||||
IDEOptionsIntf,
|
||||
// IDE
|
||||
LazarusIDEStrConsts, IDEProcs, LazConf, TransferMacros, etFPCMsgParser,
|
||||
ModeMatrixOpts, CompOptsModes, EnvironmentOpts;
|
||||
IDECmdLine, ModeMatrixOpts, CompOptsModes, EnvironmentOpts;
|
||||
|
||||
const
|
||||
DefaultCompilerPath = '$(CompPath)';
|
||||
@ -2448,7 +2448,7 @@ end;
|
||||
function TBaseCompilerOptions.MakeOptionsString(
|
||||
Flags: TCompilerCmdLineOptions): String;
|
||||
var
|
||||
switches, tempsw, t: String;
|
||||
switches, tempsw, quietsw, t: String;
|
||||
InhLinkerOpts: String;
|
||||
NewTargetFilename: String;
|
||||
NewTargetDirectory: String;
|
||||
@ -2472,13 +2472,22 @@ var
|
||||
FPCompilerFilename: String;
|
||||
s: string;
|
||||
CurFPCMsgFile: TFPCMsgFilePoolItem;
|
||||
Quiet: Boolean;
|
||||
|
||||
procedure EnableDisableVerbosityFlag(Enable: boolean; c: char);
|
||||
begin
|
||||
if Enable then
|
||||
tempsw+=c
|
||||
if Quiet or not Enable then
|
||||
quietsw+=c+'-'
|
||||
else
|
||||
switches+=' -v'+c+'-';
|
||||
tempsw+=c;
|
||||
end;
|
||||
|
||||
procedure EnableVerbosityFlag(Enable: boolean; c: char);
|
||||
begin
|
||||
if Quiet then
|
||||
quietsw+=c+'-'
|
||||
else if Enable then
|
||||
tempsw+=c;
|
||||
end;
|
||||
|
||||
begin
|
||||
@ -2734,7 +2743,7 @@ begin
|
||||
|
||||
Supported Microcontroller types:
|
||||
}
|
||||
|
||||
Quiet:=ConsoleVerbosity<=-3; // lazbuild -q -q, lazarus -q -q -q
|
||||
|
||||
CurTargetOS:='';
|
||||
CurTargetCPU:='';
|
||||
@ -2932,42 +2941,40 @@ begin
|
||||
{ ---------------- Other Tab -------------------- }
|
||||
|
||||
{ Verbosity }
|
||||
if (WriteFPCLogo) then
|
||||
if Quiet then
|
||||
switches := switches + ' -l-'
|
||||
else if WriteFPCLogo then
|
||||
switches := switches + ' -l';
|
||||
|
||||
tempsw := '';
|
||||
quietsw := '';
|
||||
// the default fpc.cfg normally contains -viwn, if the user does not want
|
||||
// to see warning pass -vw-
|
||||
// to see warnings pass -vw-
|
||||
tempsw := tempsw + 'e'; // always pass -ve, you cannot ignore errors
|
||||
EnableDisableVerbosityFlag(ShowWarn,'w');
|
||||
EnableDisableVerbosityFlag(ShowNotes,'n');
|
||||
EnableDisableVerbosityFlag(ShowHints,'h');
|
||||
tempsw := tempsw + 'i'; // always pass -vi, (e.g. (3104) Compiling) needed to resolve filenames in fpc messages without path
|
||||
if ShowLineNum then
|
||||
tempsw := tempsw + 'l';
|
||||
if ShowDebugInfo then
|
||||
tempsw := tempsw + 'd';
|
||||
if ShowUsedFiles then
|
||||
tempsw := tempsw + 'u';
|
||||
if ShowTriedFiles then
|
||||
tempsw := tempsw + 't';
|
||||
if ShowCompProc then
|
||||
tempsw := tempsw + 'p';
|
||||
if ShowCond then
|
||||
tempsw := tempsw + 'c';
|
||||
if ShowExecInfo then
|
||||
tempsw := tempsw + 'x';
|
||||
// always pass -vi for IDE, (e.g. (3104) Compiling) needed to resolve filenames in fpc messages without path
|
||||
EnableVerbosityFlag(true,'i');
|
||||
// optional verbosity flags, usually off in fpc.cfg, pass them only if wanted
|
||||
EnableVerbosityFlag(ShowLineNum,'l');
|
||||
EnableVerbosityFlag(ShowDebugInfo,'d');
|
||||
EnableVerbosityFlag(ShowUsedFiles,'u');
|
||||
EnableVerbosityFlag(ShowTriedFiles,'t');
|
||||
EnableVerbosityFlag(ShowCompProc,'p');
|
||||
EnableVerbosityFlag(ShowCond,'c');
|
||||
EnableVerbosityFlag(ShowExecInfo,'x');
|
||||
|
||||
if ShowAll or (ccloAddVerboseAll in Flags) then
|
||||
if (ShowAll and not (Quiet)) or (ccloAddVerboseAll in Flags) then
|
||||
tempsw := 'a';
|
||||
tempsw := tempsw + 'bq'; // b = full file names, q = message ids
|
||||
|
||||
if (tempsw <> '') then begin
|
||||
tempsw := '-v' + tempsw;
|
||||
switches := switches + ' ' + tempsw;
|
||||
end;
|
||||
if (tempsw <> '') then
|
||||
switches := switches + ' -v' + tempsw;
|
||||
if (quietsw <> '') then
|
||||
switches := switches + ' -v' + quietsw;
|
||||
|
||||
// -vm flags allow to enable/disable types of messages
|
||||
// -vm flags allow to enable/disable types of messages
|
||||
// Passing a -vm ID, unknown by the current compiler will create an error
|
||||
// => check the compiler message file
|
||||
if IDEMessageFlags.Count>0 then begin
|
||||
@ -2997,9 +3004,8 @@ begin
|
||||
|
||||
{ Use Custom Config File @ = yes and path }
|
||||
if not (ccloNoMacroParams in Flags)
|
||||
and (CustomConfigFile) and (ConfigFilePath<>'') then begin
|
||||
and (CustomConfigFile) and (ConfigFilePath<>'') then
|
||||
switches := switches + ' ' + PrepareCmdLineOption('@' + ConfigFilePath);
|
||||
end;
|
||||
|
||||
{ ------------- Search Paths ---------------- }
|
||||
CurOutputDir:='';
|
||||
|
@ -1643,37 +1643,51 @@ const
|
||||
begin
|
||||
Result:=UTF8ToConsole(BreakString(s,75, length(space)))
|
||||
end;
|
||||
|
||||
procedure w(Msg: string);
|
||||
begin
|
||||
writeln(LongToConsole(Msg));
|
||||
end;
|
||||
|
||||
begin
|
||||
TranslateResourceStrings(ProgramDirectory(true),'');
|
||||
writeln('');
|
||||
writeln('lazbuild [options] <project/package filename or package name>');
|
||||
writeln('');
|
||||
writeln(UTF8ToConsole(lisEdtExtToolParameters));
|
||||
w(lisEdtExtToolParameters);
|
||||
writeln('');
|
||||
writeln('--help or -? ', UTF8ToConsole(listhisHelpMessage));
|
||||
writeln('');
|
||||
writeln('-B or --build-all ', UTF8ToConsole(lisBuildAllFilesOfProjectPackageIDE));
|
||||
writeln('-r or --recursive ', UTF8ToConsole(lisApplyBuildFlagsBToDependenciesToo));
|
||||
writeln('-d or --skip-dependencies ', UTF8ToConsole(lisDoNotCompileDependencies));
|
||||
writeln('--build-ide=<options> ', UTF8ToConsole(lisBuildIDEWithPackages));
|
||||
writeln('-v or --version ', UTF8ToConsole(lisShowVersionAndExit));
|
||||
writeln('-q or --quiet ', UTF8ToConsole(lisBeLessVerboseCanBeGivenMultipleTimes));
|
||||
writeln('--verbose ', UTF8ToConsole(lisBeMoreVerboseCanBeGivenMultipleTimes));
|
||||
writeln('--help or -?');
|
||||
w(space+listhisHelpMessage);
|
||||
writeln('-B or --build-all');
|
||||
w(space+lisBuildAllFilesOfProjectPackageIDE);
|
||||
writeln('-r or --recursive');
|
||||
w(space+lisApplyBuildFlagsBToDependenciesToo);
|
||||
writeln('-d or --skip-dependencies');
|
||||
w(space+lisDoNotCompileDependencies);
|
||||
writeln('--build-ide=<options>');
|
||||
w(space+lisBuildIDEWithPackages);
|
||||
writeln('-v or --version');
|
||||
w(space+lisShowVersionAndExit);
|
||||
writeln('-q or --quiet');
|
||||
w(space+lisBeLessVerboseCanBeGivenMultipleTimes);
|
||||
w(space+'Passing quiet two times, will pass -vw-n-h-i-l-d-u-t-p-c-x- to the compiler');
|
||||
writeln('--verbose');
|
||||
w(space+lisBeMoreVerboseCanBeGivenMultipleTimes);
|
||||
writeln('');
|
||||
|
||||
writeln('--add-package');
|
||||
writeln(LongToConsole(space+lisAddPackageSToListOfInstalledPackagesCombineWithBui));
|
||||
w(space+lisAddPackageSToListOfInstalledPackagesCombineWithBui);
|
||||
writeln('--create-makefile');
|
||||
writeln(LongToConsole(space+lisInsteadOfCompilePackageCreateASimpleMakefile));
|
||||
w(space+lisInsteadOfCompilePackageCreateASimpleMakefile);
|
||||
writeln('');
|
||||
|
||||
writeln(PrimaryConfPathOptLong,'<path>');
|
||||
writeln('or ',PrimaryConfPathOptShort,'<path>');
|
||||
writeln(LongToConsole(space+lisprimaryConfigDirectoryWhereLazarusStoresItsConfig+LazConf.GetPrimaryConfigPath));
|
||||
w(space+lisprimaryConfigDirectoryWhereLazarusStoresItsConfig+LazConf.GetPrimaryConfigPath);
|
||||
writeln('');
|
||||
writeln(SecondaryConfPathOptLong,'<path>');
|
||||
writeln('or ',SecondaryConfPathOptShort,'<path>');
|
||||
writeln(LongToConsole(space+lissecondaryConfigDirectoryWhereLazarusSearchesFor+LazConf.GetSecondaryConfigPath));
|
||||
w(space+lissecondaryConfigDirectoryWhereLazarusSearchesFor+LazConf.GetSecondaryConfigPath);
|
||||
writeln('');
|
||||
writeln('--operating-system=<operating-system>');
|
||||
writeln('or --os=<operating-system>');
|
||||
@ -1701,14 +1715,13 @@ begin
|
||||
lisOverrideTheDefaultCompilerEGPpc386Ppcx64PpcppcEtcD, [space])));
|
||||
writeln('');
|
||||
writeln(LanguageOpt);
|
||||
writeln(LongToConsole(space+lisOverrideLanguage));
|
||||
w(space+lisOverrideLanguage);
|
||||
writeln('');
|
||||
writeln('--lazarusdir=<Lazarus directory>');
|
||||
writeln(LongToConsole(space+lisLazarusDirOverride));
|
||||
w(space+lisLazarusDirOverride);
|
||||
writeln('');
|
||||
writeln('--max-process-count=<count>');
|
||||
writeln(LongToConsole(space+
|
||||
lisMaximumNumberOfThreadsForCompilingInParallelDefaul));
|
||||
w(space+lisMaximumNumberOfThreadsForCompilingInParallelDefaul);
|
||||
writeln('');
|
||||
end;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user