Skip to content

Commit

Permalink
Adjust linker flags for GAP kernel extensions on macOS
Browse files Browse the repository at this point in the history
This fixes a warning one otherwise gets when building kernel extensions:

    ld: warning: directory not found for option '-L/workspace/destdir/lib'
  • Loading branch information
fingolfin committed Jun 27, 2023
1 parent d81f3ff commit 36f13c9
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/setup.jl
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,11 @@ function regenerate_gaproot()
gap_lib = joinpath(gap_prefix, "lib")
sysinfo["GAP_LDFLAGS"] = "-L$(gap_lib) -lgap"

# adjust linker flags for GAP kernel extensions on macOS
if Sys.isapple()
sysinfo["GAC_LDFLAGS"] = "-bundle -L$(gap_lib) -lgap"
end

GAP_VERSION = VersionNumber(sysinfo["GAP_VERSION"])
gaproot_packages = joinpath(Base.DEPOT_PATH[1], "gaproot", "v$(GAP_VERSION.major).$(GAP_VERSION.minor)")
sysinfo["DEFAULT_PKGDIR"] = joinpath(gaproot_packages, "pkg")
Expand Down

0 comments on commit 36f13c9

Please sign in to comment.