Skip to content

Commit

Permalink
allow options starting with -Wl,
Browse files Browse the repository at this point in the history
  • Loading branch information
HertzDevil committed Oct 25, 2024
1 parent 7fad341 commit 7012051
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/compiler/crystal/loader/unix.cr
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,15 @@ class Crystal::Loader
parser.unknown_args do |args, after_dash|
file_paths.concat args
end

# although flags starting with `-Wl,` appear in `args` above, this is
# still called by `OptionParser`, so we assume it is fine to ignore these
# flags
parser.invalid_option do |arg|
unless arg.starts_with?("-Wl,")
raise LoadError.new "Not a recognized linker flag: #{arg}"
end
end
end

search_paths = extra_search_paths + search_paths
Expand Down

0 comments on commit 7012051

Please sign in to comment.