File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -27,6 +27,13 @@ project AUnit is
27
27
for Library_Version use
28
28
external ("AUNIT_LIBRARY_VERSION", "libaunit.so.0.0");
29
29
30
+ case AUnit_Shared.Library_Kind is
31
+ when "dynamic" | "relocatable" =>
32
+ -- Put options like --as-needed before the libraries.
33
+ for Leading_Library_Options use external_As_List ("LDFLAGS", " ");
34
+ when others =>
35
+ end case;
36
+
30
37
--------------
31
38
-- Compiler --
32
39
--------------
@@ -43,6 +50,10 @@ project AUnit is
43
50
("-O2", "-gnatp", "-gnatn", "-gnatwa.X");
44
51
end case;
45
52
53
+ -- Allow user flags to override default flags.
54
+ for Default_Switches ("ada") use
55
+ Compiler'Default_Switches ("ada") & external_As_List ("ADAFLAGS", " ");
56
+
46
57
for Switches ("aunit.adb") use
47
58
Compiler'Default_Switches ("ada") & ("-fno-strict-aliasing");
48
59
end Compiler;
You can’t perform that action at this time.
0 commit comments