File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -27,6 +27,13 @@ project AUnit is
2727 for Library_Version use
2828 external ("AUNIT_LIBRARY_VERSION", "libaunit.so.0.0");
2929
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+
3037 --------------
3138 -- Compiler --
3239 --------------
@@ -43,6 +50,10 @@ project AUnit is
4350 ("-O2", "-gnatp", "-gnatn", "-gnatwa.X");
4451 end case;
4552
53+ -- Allow user flags to override default flags.
54+ for Default_Switches ("ada") use
55+ Compiler'Default_Switches ("ada") & external_As_List ("ADAFLAGS", " ");
56+
4657 for Switches ("aunit.adb") use
4758 Compiler'Default_Switches ("ada") & ("-fno-strict-aliasing");
4859 end Compiler;
You can’t perform that action at this time.
0 commit comments