ref: 59a098256a8e983f8e46473b70f4e35241b22a72
parent: 93db6a9fd69794d74e56cbdfc7796b46da407812
author: Carlin Bingham <[email protected]>
date: Tue Jan 9 21:57:37 EST 2018
Dynamically link if any deps use dynamic libs
--- a/mbld/deps.myr
+++ b/mbld/deps.myr
@@ -177,7 +177,6 @@
for l : ll
std.slpush(&dynlibs, l)
;;
- mt.isdyn = true
elif std.hassuffix(f, config.Objsuffix)
depends(g, go, p)
else
@@ -462,7 +461,7 @@
if std.sleq(opt_sys, "osx")
std.slpush(&n.cmd, std.sldup("-macosx_version_min"))
std.slpush(&n.cmd, std.sldup("10.6"))
- elif std.sleq(opt_sys, "linux") && mt.isdyn
+ elif std.sleq(opt_sys, "linux") && b.dynlink
std.slpush(&n.cmd, std.sldup("-dynamic-linker"))
std.slpush(&n.cmd, std.sldup("/lib64/ld-linux-x86-64.so.2"))
;;
--- a/mbld/libs.myr
+++ b/mbld/libs.myr
@@ -146,6 +146,7 @@
match std.htget(b.libs, lib)
| `std.None:
std.slpush(sl, std.fmt("-l{}", lib))
+ b.dynlink = true
| `std.Some ld:
for l : ld.dep
addlib(b, sl, l, added, diradded, looped)
--- a/mbld/parse.myr
+++ b/mbld/parse.myr
@@ -472,7 +472,6 @@
.islib=false,
.istest=istest,
.isbench=isbench,
- .isdyn=false,
/* attrs */
.tags=tags,
.install=install,
--- a/mbld/types.myr
+++ b/mbld/types.myr
@@ -20,6 +20,9 @@
system : byte[:]
arch : byte[:]
+ /* dynmically link */
+ dynlink : bool
+
;;
type targ = union
@@ -46,7 +49,6 @@
islib : bool
istest : bool
isbench : bool
- isdyn : bool
install : bool
;;