-
Notifications
You must be signed in to change notification settings - Fork 123
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
Adds clang as second compiler for test cases #27
Conversation
…ed clang as first examples. Fixed test cases to work with gcc
runs also unittests), install_cross_compilers installs also clang.
…ed clang as first examples. Fixed test cases to work with gcc
runs also unittests), install_cross_compilers installs also clang.
…r into add_compiler_support
res = cwe_checker_testlib.execute_and_check_occurence(self.target, self.target, 'x64', 'gcc', self.string) | ||
self.assertEqual(res, expect_res) | ||
|
||
@unittest.skip("FIXME") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I should take a look at this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
clang seems to optimze away the relevant calls for the check. Is there a "do not optimize anything"-flag for clang that we could use?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we could build the binaries with -o0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If it is not enabled by default, we should do that.
Edit: Ahh, cwe 476 needed optimizations to prevent other false positives... Ok, let's wait with fixing this issue until we removed these false positives from the check.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! I want to test it on my computer before merging, which I will do tomorrow morning.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For some reason the x86_gcc test binaries are not built on Ubuntu 18.04. Could you take a look at this?
I am going to look into the x86_gcc issue. But I suppose it's a problem with dockcross.... |
I did a clean build of all artificial examples on this branch. I was able to build for all arches including x86. Could you please check your dockcross installation? |
OK, then it is probably a problem on my machine. Merging. |
Even though clang is the first example, we could add more compilers in the future (e.g. the official ARM compilers).