Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Yet another unknown GCC flag (-mfloat-gprs=double) #1618

Merged
merged 1 commit into from
Jun 7, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion libcodechecker/log/option_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,9 @@
# Link Time Optimization:
'^-flto': 0,
# MicroBlaze Options:
'^-mxl': 0
'^-mxl': 0,
# PowerPC SPE Option:
'^-mfloat-gprs': 0
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add a test for it -mfloat-gprs=double:

def test_ignore_flags(self):

}

# Unknown options by clang, will be skipped.
Expand Down
3 changes: 2 additions & 1 deletion tests/unit/test_option_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,8 @@ def test_link_with_include_paths(self):
self.assertEqual(ActionType.LINK, res.action)

def test_ignore_flags(self):
ignore = ["-Werror", "-MT hello", "-M", "-fsyntax-only"]
ignore = ["-Werror", "-MT hello", "-M", "-fsyntax-only",
"-mfloat-gprs=double", "-mfloat-gprs=yes"]
build_cmd = "g++ {} main.cpp".format(' '.join(ignore))
res = option_parser.parse_options(build_cmd)
self.assertEqual(res.compile_opts, ["-fsyntax-only"])