@@ -18,6 +18,10 @@ library project Langkit_Support is
18
18
Library_Standalone : Library_Standalone_Type := external
19
19
("LANGKIT_SUPPORT_STANDALONE", external ("STANDALONE", "standard"));
20
20
21
+ SO_Name := External ("LANGKIT_SUPPORT_SONAME", "");
22
+ Ada_Flags := External_As_List ("ADAFLAGS", " ");
23
+ Ld_Flags := External_As_List ("LDFLAGS", " ");
24
+
21
25
for Languages use ("Ada");
22
26
for Source_Dirs use (".");
23
27
for Object_Dir use "obj/" & Build_Mode;
@@ -82,6 +86,19 @@ library project Langkit_Support is
82
86
for Library_Kind use Library_Kind_Param;
83
87
for Library_Dir use "lib/" & Library_Kind_Param & "/" & Build_Mode;
84
88
89
+ case Library_Kind_Param is
90
+ when "relocatable" =>
91
+ case SO_Name is
92
+ when "" =>
93
+ null;
94
+ when others =>
95
+ for Library_Version use SO_Name;
96
+ end case;
97
+ for Leading_Library_Options use Ld_Flags;
98
+ when "static" | "static-pic" =>
99
+ null;
100
+ end case;
101
+
85
102
Common_Ada_Cargs := ("-gnatwa", "-gnatyg", "-fPIC");
86
103
87
104
package Compiler is
@@ -102,6 +119,7 @@ library project Langkit_Support is
102
119
for Default_Switches ("Ada") use
103
120
("-Og", "-ggdb", "-g3", "-fno-omit-frame-pointer");
104
121
end case;
122
+ for Default_Switches ("Ada") use Default_Switches ("Ada") & Adaflags;
105
123
end Compiler;
106
124
107
125
end Langkit_Support;
0 commit comments