Rakefile: improve filtering optimization flags for iso639_language_list.cpp

The old regular expression did not filter out non-numeric optimization
levels options such as `-Os`, nor did it filter the option out if it
was at the end of the flags string.

See 3105 for context.
This commit is contained in:
Moritz Bunkus 2021-05-22 19:45:51 +02:00
parent 879959b35b
commit ba6db89e24
No known key found for this signature in database
GPG Key ID: 74AF00ADF2E32C85
2 changed files with 11 additions and 1 deletions

10
NEWS.md
View File

@ -1,3 +1,13 @@
# Version ?
## Bug fixes
* build system: fixed filtering out optimization options when compiling the
file `iso639_language_list.cpp` (before only numeric optimization levels
were filtered out and only if it wasn't the last option in the list of
flags). See #3105 for context.
# Version 57.0.0 "Till The End" 2021-05-22
## New features and enhancements

View File

@ -355,7 +355,7 @@ cxx_compiler = lambda do |*args|
# Even -O1 causes compilation time & memory usage to skyrocket,
# possibly exponentially, with the number of entries to
# emplace_back() into the vector.
flags.gsub!(%r{ -O\d+ }, ' -O0 ')
flags.gsub!(%r{(^| )-O[^ ]*}, ' -O0')
end
args = [