mighty-gerbils / gerbil

Gerbil Scheme
https://cons.io
GNU Lesser General Public License v2.1
1.16k stars 112 forks source link

Link options dont propagate from dependencies to consumers #1198

Open saagraa opened 7 months ago

saagraa commented 7 months ago

With the following structure, my-exe will not link to system-lib. The link options have to get copied into the exe build script for linking to occur.

my-lib/build.ss:

(defbuild-script
 `((gxc: "my-lib" "-ld-options" ,(pkg-config-libs "system-lib"))))

./my-exe/build.ss:

(defbuild-script
  `((exe: "my-exe")))

./my-exe/gerbil.pkg

(package: me depend: [my-lib])
vyzo commented 7 months ago

This is a known issue, that we want to fix.

The simplest solution would be to generate a link info file from make, which the compiler can ingest in dependency analysis.