This is an archive of the discontinued LLVM Phabricator instance.

Silence warning for unrecognised "-std=c99" warning on MSVC
ClosedPublic

Authored by angelsl on Oct 13 2015, 4:23 AM.

Diff Detail

Repository
rL LLVM

Event Timeline

angelsl updated this revision to Diff 37232.Oct 13 2015, 4:23 AM
angelsl retitled this revision from to Silence warning for unrecognised "-std=c99" warning on MSVC.
angelsl updated this object.
angelsl added a reviewer: compnerd.
angelsl added subscribers: compnerd, llvm-commits.
compnerd added inline comments.Oct 14 2015, 7:31 PM
lib/builtins/CMakeLists.txt
369 ↗(On Diff #37232)

How about making this more similar to the other flags checks? We could then just do the append_if

angelsl updated this revision to Diff 37455.Oct 15 2015, 1:51 AM
angelsl updated this revision to Diff 37456.
angelsl marked an inline comment as done.
angelsl updated this revision to Diff 37464.Oct 15 2015, 2:27 AM

CMake variable expansion @_@

compnerd edited edge metadata.Oct 18 2015, 6:32 PM

This seems to filter it even on Darwin? At least when I tested it, it did. Im not sure what is causing that.

Nothing to do with my change, Darwin/Apple doesn't even go through it; there's the if (APPLE) branch above it.

Instead of special-casing on MSVC, can you add check_c_compiler_flag(-std=c99 COMPILER_RT_HAS_STD_C99_FLAG) to cmake/config-ix.cmake, and properly use it here?

angelsl updated this revision to Diff 37958.Oct 20 2015, 7:37 PM
angelsl edited edge metadata.

Use LLVM-style compiler flag checks

angelsl updated this revision to Diff 37960.Oct 20 2015, 7:49 PM

Append the flag outside the loop (otherwise we get it twice, thrice, etc)

angelsl updated this revision to Diff 37961.Oct 20 2015, 7:56 PM

I didn't notice -std=c++11 was considered a codegen option.

samsonov accepted this revision.Oct 21 2015, 12:04 PM
samsonov added a reviewer: samsonov.

LGTM

This revision is now accepted and ready to land.Oct 21 2015, 12:04 PM

Please help me commit this, thanks!

Would appreciate it if someone commited this.

This revision was automatically updated to reflect the committed changes.