This is an archive of the discontinued LLVM Phabricator instance.

[analyzer] Update SATestBuild.py to set -isysroot for preprocessed files
ClosedPublic

Authored by dcoughlin on Sep 10 2015, 11:04 AM.

Diff Detail

Repository
rL LLVM

Event Timeline

dcoughlin updated this revision to Diff 34466.Sep 10 2015, 11:04 AM
dcoughlin retitled this revision from to [analyzer] Update SATestBuild.py to set -isysroot for preprocessed files.
dcoughlin updated this object.
dcoughlin added reviewers: zaks.anna, xazax.hun.
dcoughlin added a subscriber: cfe-commits.
xazax.hun added inline comments.Sep 10 2015, 11:11 AM
utils/analyzer/SATestBuild.py
277 ↗(On Diff #34466)

I think it might be better to check if the host os is OS X. This way one might be able to check preprocessed files on other linux.

xazax.hun edited edge metadata.Sep 10 2015, 11:12 AM
  • on other OS-es like linux.
dcoughlin added inline comments.Sep 10 2015, 11:18 AM
utils/analyzer/SATestBuild.py
277 ↗(On Diff #34466)

The patch checks for the existence of xcrun in the path and doesn't set -isysroot if that is not present, so this should continue to work on Linux and cygwin.

xazax.hun added inline comments.Sep 10 2015, 11:25 AM
utils/analyzer/SATestBuild.py
277 ↗(On Diff #34466)

I see, however -cc1 option is only used when the SDKPath is not None. Is this intended?

dcoughlin added inline comments.Sep 10 2015, 11:26 AM
utils/analyzer/SATestBuild.py
277 ↗(On Diff #34466)

No, you're right -- that is not intended.

dcoughlin updated this revision to Diff 34471.Sep 10 2015, 11:33 AM
dcoughlin edited edge metadata.

Pass -cc1 to clang even when SDK path is not found.

xazax.hun accepted this revision.Sep 10 2015, 2:57 PM
xazax.hun edited edge metadata.

It looks good to me.

This revision is now accepted and ready to land.Sep 10 2015, 2:57 PM
This revision was automatically updated to reflect the committed changes.