Skip to content

Commit

Permalink
ext: tell clang to ignore unknown options
Browse files Browse the repository at this point in the history
Related to #2689
  • Loading branch information
flavorjones committed Nov 11, 2022
1 parent 9a51899 commit 064d346
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ This version of Nokogiri uses [`jar-dependencies`](https://github.com/mkristian/
* [CRuby] `Nokogiri::HTML5::Document#url` now correctly returns the URL passed to the constructor method. Previously it always returned `nil`. [[#2583](https://github.com/sparklemotion/nokogiri/issues/2583)]
* [JRuby] Fixed a bug with adding the same namespace to multiple nodes via `#add_namespace_definition`. [[#1247](https://github.com/sparklemotion/nokogiri/issues/1247)]
* [JRuby] `NodeSet#[]` now raises a TypeError if passed an invalid parameter type. [[#2211](https://github.com/sparklemotion/nokogiri/issues/2211)]
* [CRuby+OSX] Compiling from source on MacOS will use the clang option `-Wno-unknown-warning-option` to avoid errors when Ruby injects options that clang doesn't know about. [[#2689](https://github.com/sparklemotion/nokogiri/issues/2689)]


### Improved
Expand Down
5 changes: 4 additions & 1 deletion ext/nokogiri/extconf.rb
Original file line number Diff line number Diff line change
Expand Up @@ -628,7 +628,10 @@ def do_clean
append_cflags("-Wmissing-noreturn")

# handle clang variations, see #1101
append_cflags("-Wno-error=unused-command-line-argument-hard-error-in-future") if darwin?
if darwin?
append_cflags("-Wno-error=unused-command-line-argument-hard-error-in-future")
append_cflags("-Wno-unknown-warning-option")
end

# these tend to be noisy, but on occasion useful during development
# append_cflags(["-Wcast-qual", "-Wwrite-strings"])
Expand Down

0 comments on commit 064d346

Please sign in to comment.