This is an archive of the discontinued LLVM Phabricator instance.

Move duplicate Windows-specific compiler flags to a common CMake variable
ClosedPublic

Authored by timurrrr on May 29 2014, 3:22 AM.

Details

Reviewers
samsonov
timurrrr

Diff Detail

Event Timeline

timurrrr updated this revision to Diff 9914.May 29 2014, 3:22 AM
timurrrr retitled this revision from to Move duplicate Windows-specific compiler flags to a common CMake variable.
timurrrr updated this object.
timurrrr edited the test plan for this revision. (Show Details)
timurrrr added a reviewer: samsonov.
timurrrr added a subscriber: Unknown Object (MLST).
rnk added a subscriber: rnk.May 29 2014, 10:03 AM

drive by nits that were already there

cmake/Modules/AddCompilerRT.cmake
129

Can we use -isystem to suppress these? Does -D_CRT_SECURE_NO_WARNINGS solve this problem?

137

ditto, this can be handled with -isystem.

samsonov edited edge metadata.May 29 2014, 10:31 AM

I'm ok with this patch. Deferring this to Reid who apparently knows more about Windows-specific warnings.

cmake/Modules/AddCompilerRT.cmake
116

Remove ""

Can you elaborate on the -isystem approach? I'm not sure I know what you're
taking about.
29 мая 2014 г. 21:03 пользователь "Reid Kleckner" <rnk@google.com> написал:

drive by nits that were already there

Comment at: cmake/Modules/AddCompilerRT.cmake:129
@@ -126,1 +128,3 @@
if(MSVC)
+ # MSVC system headers and gtest use a lot of deprecated stuff.

+ list(APPEND COMPILER_RT_TEST_CFLAGS

Can we use -isystem to suppress these? Does -D_CRT_SECURE_NO_WARNINGS
solve this problem?

Comment at: cmake/Modules/AddCompilerRT.cmake:137
@@ +136,3 @@
+
+ # We should teach clang to understand more pragmas.

+ list(APPEND COMPILER_RT_TEST_CFLAGS

ditto, this can be handled with -isystem.

http://reviews.llvm.org/D3952

2014-05-29 21:03 GMT+04:00 Reid Kleckner <rnk@google.com>:

drive by nits that were already there

Comment at: cmake/Modules/AddCompilerRT.cmake:129
@@ -126,1 +128,3 @@
if(MSVC)
+ # MSVC system headers and gtest use a lot of deprecated stuff.

+ list(APPEND COMPILER_RT_TEST_CFLAGS

Can we use -isystem to suppress these? Does -D_CRT_SECURE_NO_WARNINGS
solve this problem?\

-D_CRT_SECURE_NO_WARNINGS doesn't solve the problem.

Comment at: cmake/Modules/AddCompilerRT.cmake:137
@@ +136,3 @@
+
+ # We should teach clang to understand more pragmas.

+ list(APPEND COMPILER_RT_TEST_CFLAGS

ditto, this can be handled with -isystem.

In fact, the warning comes from the sanitizer runtime code.

timurrrr accepted this revision.May 30 2014, 5:52 AM
timurrrr added a reviewer: timurrrr.

I've landed a reduced and regrouped version of the patch as r209889 -- so it's easier to work on further stuff.

Please tell me if you think I should improve anything in particular and strongly feel we need to do that for test flags.

This revision is now accepted and ready to land.May 30 2014, 5:52 AM
timurrrr closed this revision.May 30 2014, 5:53 AM