Skip to content

Commit f28eba1

Browse files
authored
fix:miss LD_LIBRARY_PATH flags (#339)
1 parent 010c78d commit f28eba1

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

android/compile.v

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -278,6 +278,7 @@ pub fn compile(opt CompileOptions) ! {
278278
mut cflags := opt.c_flags.clone()
279279
mut includes := []string{}
280280
mut defines := []string{}
281+
mut ldpaths := []string{}
281282
mut ldflags := []string{}
282283

283284
// Grab any external C flags
@@ -294,6 +295,9 @@ pub fn compile(opt CompileOptions) ! {
294295
}
295296
includes << line
296297
}
298+
if line.starts_with('-L') {
299+
ldpaths << line
300+
}
297301
if line.starts_with('-l') {
298302
if line.contains('-lgc') {
299303
// compiled in
@@ -474,6 +478,7 @@ pub fn compile(opt CompileOptions) ! {
474478
'-o "${arch_lib_dir}/lib${opt.lib_name}.so"',
475479
arch_a_files.join(' '),
476480
'-L"' + arch_libs[arch] + '"',
481+
ldpaths.join(' '),
477482
ldflags.join(' '),
478483
]
479484

0 commit comments

Comments
 (0)