-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpadlock_echo_server_config.gpr
More file actions
42 lines (35 loc) · 1.79 KB
/
padlock_echo_server_config.gpr
File metadata and controls
42 lines (35 loc) · 1.79 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
abstract project Padlock_Echo_Server_Config is
for Create_Missing_Dirs use "True";
type Build_Profile_Kind is ("debug", "release");
Build_Profile : Build_Profile_Kind := external ("BUILD_PROFILE", "debug");
type Tada_OS_Kind is ("freebsd", "linux", "macos", "openbsd", "windows", "unknown");
Tada_OS : Tada_OS_Kind := external ("TADA_OS", "unknown");
type Tada_Arch_Kind is ("aarch64", "x86_64", "unknown");
Tada_Arch : Tada_Arch_Kind := external ("TADA_ARCH", "unknown");
Binder_Switches := ("-Es", "-static");
Builder_Switches := ("-j0", "-s");
Compiler_Switches := ();
Common_Compiler_Switches := ("-gnat2022", "-gnatwa", "-gnata", "-gnatX", "-fstack-check", "-gnato", "-g");
Style_Switches := ("-gnatyaAbCdefhiklnOprStux");
Debug_Switches := Common_Compiler_Switches & Style_Switches &
("-O0", "-gnateE", "-gnatVa");
Release_Switches := Common_Compiler_Switches & Style_Switches &
("-O2", "-gnatn", "-fdata-sections", "-ffunction-sections");
case Build_Profile is
when "debug" => Compiler_Switches := Debug_Switches;
when "release" => Compiler_Switches := Release_Switches;
end case;
Linker_Switches := ();
case Build_Profile is
when "debug" => Linker_Switches := ();
when "release" =>
case Tada_OS is
when "freebsd" => Linker_Switches := ("-Wl,--gc-sections");
when "linux" => Linker_Switches := ("-Wl,--gc-sections");
when "macos" => Linker_Switches := ("-Wl,-dead_strip");
when "openbsd" => Linker_Switches := ("-Wl,--gc-sections");
when "windows" => Linker_Switches := ("-Wl,--gc-sections", "-static");
when "unknown" => Linker_Switches := ();
end case;
end case;
end Padlock_Echo_Server_Config;