New issue
Advanced search Search tips

Issue 617318 link

Starred by 1 user

Issue metadata

Status: Untriaged
Owner: ----
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 3
Type: Bug

Blocking:
issue 495204
issue 82385



Sign in to add a comment

codebase on Windows vs Wnonportable-include-path

Project Member Reported by thakis@chromium.org, Jun 3 2016

Issue description

clang has a new upstream warning that warns on things like this:

C:\b\depot_tools\win_toolchain\vs_files\95ddda401ec5678f15eeed01d2bee08fcbc5ee97\DIA SDK\include\dia2.h(30,10):  error: non-portable path to file '"Windows.h"'; specified path differs in case from file name on disk [-Werror,-Wnonportable-include-path]
#include "windows.h"
         ^~~~~~~~~~~
         "Windows.h"


This seems generally useful, but we can't fix includes in system headers of course. There's still some upstream discussion on what to do about that. Wait for that to settle down, then take another look.
 
Project Member

Comment 1 by bugdroid1@chromium.org, Jun 3 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/2bc751024e4ddf3f50594abdbf3c54b77df84562

commit 2bc751024e4ddf3f50594abdbf3c54b77df84562
Author: Nico Weber <thakis@chromium.org>
Date: Fri Jun 03 22:27:59 2016

Suppress -Wnonportable-include-path on clang tot bots

BUG=617318
R=hans@chromium.org

Review URL: https://codereview.chromium.org/2040533003 .

Cr-Commit-Position: refs/heads/master@{#397823}

[modify] https://crrev.com/2bc751024e4ddf3f50594abdbf3c54b77df84562/build/common.gypi
[modify] https://crrev.com/2bc751024e4ddf3f50594abdbf3c54b77df84562/build/config/compiler/BUILD.gn

Project Member

Comment 2 by bugdroid1@chromium.org, Jun 6 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/2b359d2e5b4f7639055c9c6ff3ed39a03a2a3a0b

commit 2b359d2e5b4f7639055c9c6ff3ed39a03a2a3a0b
Author: hans <hans@chromium.org>
Date: Mon Jun 06 18:12:30 2016

Revert of Suppress -Wnonportable-include-path on clang tot bots (patchset #2 id:20001 of https://codereview.chromium.org/2040533003/ )

Reason for revert:
The Clang warning was removed again in r271761.

Original issue's description:
> Suppress -Wnonportable-include-path on clang tot bots
>
> BUG=617318
> R=hans@chromium.org
>
> Committed: https://chromium.googlesource.com/chromium/src/+/2bc751024e4ddf3f50594abdbf3c54b77df84562

TBR=thakis@chromium.org
# Not skipping CQ checks because original CL landed more than 1 days ago.
BUG=617318

Review-Url: https://codereview.chromium.org/2043813002
Cr-Commit-Position: refs/heads/master@{#398065}

[modify] https://crrev.com/2b359d2e5b4f7639055c9c6ff3ed39a03a2a3a0b/build/common.gypi
[modify] https://crrev.com/2b359d2e5b4f7639055c9c6ff3ed39a03a2a3a0b/build/config/compiler/BUILD.gn

Comment 3 by thakis@chromium.org, Jun 14 2016

This landed again upstream with these tweaks:

* -Wnonportable-include-path only warns about includes that aren't from system includes, or on includes that are part of a list of well-known includes (see warnByDefaultOnWrongCase() – stdio.h iostream etc)
* There's also an off-by-default -Wnonportable-system-include-path that can warn on system headers

So we should now be able to at least clean up Wnonportable-include-path in our code.

Microsoft's STL says they'd accept patches for this in system headers, so we could try to compile all SDK headers with this warning enabled and then send him a list of changes.




Comment 4 by thakis@chromium.org, Jun 14 2016

Warning was implemented at http://reviews.llvm.org/D19843 with tiny buildfix follow-up at http://reviews.llvm.org/rL272592
Project Member

Comment 5 by bugdroid1@chromium.org, Jun 14 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/7d9add3bd7c9655d92641fb2aac427d1cb417095

commit 7d9add3bd7c9655d92641fb2aac427d1cb417095
Author: thakis <thakis@chromium.org>
Date: Tue Jun 14 15:27:50 2016

Reland of Suppress -Wnonportable-include-path on clang tot bots (patchset #1 id:1 of https://codereview.chromium.org/2043813002/ )

Reason for revert:
Warning landed again upstream.

Original issue's description:
> Revert of Suppress -Wnonportable-include-path on clang tot bots (patchset #2 id:20001 of https://codereview.chromium.org/2040533003/ )
>
> Reason for revert:
> The Clang warning was removed again in r271761.
>
> Original issue's description:
> > Suppress -Wnonportable-include-path on clang tot bots
> >
> > BUG=617318
> > R=hans@chromium.org
> >
> > Committed: https://chromium.googlesource.com/chromium/src/+/2bc751024e4ddf3f50594abdbf3c54b77df84562
>
> TBR=thakis@chromium.org
> # Not skipping CQ checks because original CL landed more than 1 days ago.
> BUG=617318
>
> Committed: https://crrev.com/2b359d2e5b4f7639055c9c6ff3ed39a03a2a3a0b
> Cr-Commit-Position: refs/heads/master@{#398065}

TBR=hans@chromium.org
# Not skipping CQ checks because original CL landed more than 1 days ago.
BUG=617318

Review-Url: https://codereview.chromium.org/2069603002
Cr-Commit-Position: refs/heads/master@{#399714}

[modify] https://crrev.com/7d9add3bd7c9655d92641fb2aac427d1cb417095/build/common.gypi
[modify] https://crrev.com/7d9add3bd7c9655d92641fb2aac427d1cb417095/build/config/compiler/BUILD.gn

Comment 6 Deleted

Project Member

Comment 7 by bugdroid1@chromium.org, Jun 15 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/4c33b455ce98383000f33e3519ab320d6b8629c0

commit 4c33b455ce98383000f33e3519ab320d6b8629c0
Author: thakis <thakis@chromium.org>
Date: Wed Jun 15 16:06:13 2016

clang/win: Use /FIintrin.h instead of /FIIntrin.h

Since Windows uses a case-insensitive file system, this doesn't matter much,
but if we ever want to turn on -Wnonportable-system-include-path we'll need
this.

(clang's lib/Headers/Intrin.h was renamed to intrin.h to match the Microsoft
header in clang r272701.)

BUG=617318

Review-Url: https://codereview.chromium.org/2066213002
Cr-Commit-Position: refs/heads/master@{#399912}

[modify] https://crrev.com/4c33b455ce98383000f33e3519ab320d6b8629c0/build/common.gypi
[modify] https://crrev.com/4c33b455ce98383000f33e3519ab320d6b8629c0/build/config/win/BUILD.gn

Project Member

Comment 8 by bugdroid1@chromium.org, Jul 15 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/external/webrtc.git/+/72b7f93e684bab1e9bfe98c0190f23cb79ea74a5

commit 72b7f93e684bab1e9bfe98c0190f23cb79ea74a5
Author: thakis <thakis@chromium.org>
Date: Fri Jul 15 14:21:22 2016

Use correct case for including a file.

Necessary when compiling this file on a case-sensitive file system.

BUG=chromium:495204,chromium:617318

Review-Url: https://codereview.webrtc.org/2145373004
Cr-Commit-Position: refs/heads/master@{#13488}

[modify] https://crrev.com/72b7f93e684bab1e9bfe98c0190f23cb79ea74a5/webrtc/base/winping.h

Comment 9 by thakis@chromium.org, Jul 18 2016

With the change in comment 8 rolled in, I think we're -Wnonportable-include-path clean. (This isn't true for -Wnonportable-system-include-path – the biggest problem here is that we might have to fix system headers for that.)

HOWEVER, goma currently converts all on-disk caches to lower-case, meaning the warning doesn't work on goma. So that needs to be fixed first.
s/first/before turning on the non-system version of this warning/
Labels: -Clang clang
keywords Wno-nonportable-include-path Wno-nonportable-system-include-path
Blocking: 495204
not _really_ blocking bug 495204, but somewhat related
Blocking: 82385
Also not really blocking  issue 82385 
Project Member

Comment 14 by bugdroid1@chromium.org, Oct 19

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/7c1437e0fdf585a3c7549d683a0b1453244c8d54

commit 7c1437e0fdf585a3c7549d683a0b1453244c8d54
Author: Takuto Ikuta <tikuta@chromium.org>
Date: Fri Oct 19 07:15:07 2018

Narrow scope of -Wno-nonportable-include-path flag

Suppress the warning only on windows build.

This will help to prevent case insenstive include on Mac.

Bug: 617318
Change-Id: I765c10473f750277706fe60ec1c4779d4e11203b
Reviewed-on: https://chromium-review.googlesource.com/c/1286101
Commit-Queue: Takuto Ikuta <tikuta@chromium.org>
Reviewed-by: Nico Weber <thakis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#601070}
[modify] https://crrev.com/7c1437e0fdf585a3c7549d683a0b1453244c8d54/build/config/compiler/BUILD.gn

Sign in to add a comment