Skip to content

Commit

Permalink
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/compiler/crystal/codegen/link.cr
Original file line number Diff line number Diff line change
@@ -18,12 +18,6 @@ module Crystal
has_pkg_config = nil

String.build do |flags|
# Add the default path as -L flags: important on FreeBSD,
# where the default cc doesn't use /usr/local/lib by default
library_path.each do |path|
flags << " -L#{path}"
end

link_attributes.reverse_each do |attr|
if ldflags = attr.ldflags
flags << " " << ldflags
@@ -47,6 +41,12 @@ module Crystal
flags << " -framework " << framework
end
end

# Append the default paths as -L flags in case the linker doesn't know
# about them (eg: FreeBSD won't search /usr/local/lib by default):
library_path.each do |path|
flags << " -L#{path}"
end
end
end

0 comments on commit 8a602d7

Please sign in to comment.