mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-30 20:10:36 +02:00
IDE+lazbuild: add compiler parameter -WR only for Windows
git-svn-id: trunk@41641 -
This commit is contained in:
parent
ff691cadc3
commit
1b4b788bc9
@ -2596,12 +2596,13 @@ begin
|
||||
-WG Specify graphic type application (EMX, OS/2, Windows)
|
||||
-Wi Use internal resources (Darwin)
|
||||
-WI Turn on/off the usage of import sections (Windows)
|
||||
-WM<x> Minimum Mac OS X deployment version: 10.4, 10.5.1, ... (Darwin)
|
||||
-WN Do not generate relocation code, needed for debugging (Windows)
|
||||
-WR Generate relocation code (Windows)
|
||||
-WX Enable executable stack (Linux)
|
||||
-X Executable options:
|
||||
-Xc Pass --shared/-dynamic to the linker (BeOS, Darwin, FreeBSD, Linux)
|
||||
-Xd Do not use standard library search path (needed for cross compile)
|
||||
-Xd Do not search default library path (sometimes required for cross-compiling when not using -XR)
|
||||
-Xe Use external linker
|
||||
-Xg Create debuginfo in a separate file and add a debuglink section to executable
|
||||
-XD Try to link units dynamically (defines FPC_LINK_DYNAMIC)
|
||||
@ -2664,6 +2665,19 @@ begin
|
||||
}
|
||||
|
||||
|
||||
CurTargetOS:='';
|
||||
CurTargetCPU:='';
|
||||
if not (ccloNoMacroParams in Flags) then
|
||||
begin
|
||||
Vars:=GetBuildMacroValues(Self,true);
|
||||
if Vars<>nil then
|
||||
begin
|
||||
CurTargetOS:=GetFPCTargetOS(Vars.Values['TargetOS']);
|
||||
CurTargetCPU:=GetFPCTargetCPU(Vars.Values['TargetCPU']);
|
||||
end;
|
||||
end;
|
||||
CurSrcOS:=GetDefaultSrcOSForTargetOS(CurTargetOS);
|
||||
|
||||
{ --------------- Parsing Tab ------------------- }
|
||||
|
||||
{ Assembler reading style -Ratt = AT&T -Rintel = Intel -Rdirect = direct }
|
||||
@ -2690,7 +2704,7 @@ begin
|
||||
{ UnitStyle '' = Static 'D' = Dynamic (not implemented) 'X' = smart linked }
|
||||
if SmartLinkUnit then
|
||||
switches := switches + ' -CX';
|
||||
if RelocatableUnit then
|
||||
if RelocatableUnit and (CurSrcOS='win') then
|
||||
switches := switches + ' -WR';
|
||||
|
||||
{ Checks }
|
||||
@ -2742,31 +2756,18 @@ begin
|
||||
if (VariablesInRegisters) then
|
||||
Switches := Switches + ' -OoREGVAR';
|
||||
|
||||
{ Target OS }
|
||||
if (CurTargetOS<>'')
|
||||
and ((TargetOS<>'') or (CurTargetOS<>GetDefaultTargetOS)) then
|
||||
switches := switches + ' -T' + CurTargetOS;
|
||||
{ Target CPU }
|
||||
if (CurTargetCPU<>'')
|
||||
and ((TargetCPU<>'') or (CurTargetCPU<>GetDefaultTargetCPU)) then
|
||||
switches := switches + ' -P' + CurTargetCPU;
|
||||
{ TargetProcessor }
|
||||
if TargetProcessor<>'' then
|
||||
Switches:=Switches+' -Op'+UpperCase(TargetProcessor);
|
||||
|
||||
CurTargetOS:='';
|
||||
CurTargetCPU:='';
|
||||
if not (ccloNoMacroParams in Flags) then
|
||||
begin
|
||||
Vars:=GetBuildMacroValues(Self,true);
|
||||
if Vars<>nil then
|
||||
begin
|
||||
{ Target OS }
|
||||
CurTargetOS:=GetFPCTargetOS(Vars.Values['TargetOS']);
|
||||
if (CurTargetOS<>'')
|
||||
and ((TargetOS<>'') or (CurTargetOS<>GetDefaultTargetOS)) then
|
||||
switches := switches + ' -T' + CurTargetOS;
|
||||
{ Target CPU }
|
||||
CurTargetCPU:=GetFPCTargetCPU(Vars.Values['TargetCPU']);
|
||||
if (CurTargetCPU<>'')
|
||||
and ((TargetCPU<>'') or (CurTargetCPU<>GetDefaultTargetCPU)) then
|
||||
switches := switches + ' -P' + CurTargetCPU;
|
||||
end;
|
||||
end;
|
||||
CurSrcOS:=GetDefaultSrcOSForTargetOS(CurTargetOS);
|
||||
|
||||
{ --------------- Linking Tab ------------------- }
|
||||
|
||||
{ Debugging }
|
||||
|
@ -25,6 +25,7 @@
|
||||
|
||||
ToDo:
|
||||
- add checkbox Show build modes
|
||||
- move Compiler.BuildMacros to package.BuildMacros
|
||||
- move IDE macros only for package usage
|
||||
- undo: combine changes while editing a cell
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
unit package_provides_options;
|
||||
unit Package_Provides_Options;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user