Bug 191314 - Adjust handling of Include paths that need quoting
Summary: Adjust handling of Include paths that need quoting
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Keith Rollin
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2018-11-06 10:55 PST by Keith Rollin
Modified: 2018-11-06 12:55 PST (History)
11 users (show)

See Also:


Attachments
Patch (8.85 KB, patch)
2018-11-06 10:58 PST, Keith Rollin
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Keith Rollin 2018-11-06 10:55:08 PST
There are several places in the JavaScriptCore Xcode project where the paths defined in HEADER_SEARCH_PATHS are quoted. That is, the definitions look like:

HEADER_SEARCH_PATHS = (
    "\"${BUILT_PRODUCTS_DIR}/DerivedSources/JavaScriptCore\"",
    "\"${BUILT_PRODUCTS_DIR}/LLIntOffsets/${ARCHS}\"",
    "\"$(JAVASCRIPTCORE_FRAMEWORKS_DIR)/JavaScriptCore.framework/PrivateHeaders\"",
    "$(inherited)",
);

The idea here is presumably to have the resulting $(CPP) command have -I options where the associated paths are themselves quoted, protecting against space characters in the paths.

This approach to quote management can break under Xcode 9. If .xcfilelist files are added to the project, the 'objectVersion' value in the Xcode project file is changed from 46 to 51. If a project with objectVersion=51 is presented to Xcode 9 (as can happen when we build for older OS's), it produces build lines where the quotes are escaped, thereby becoming part of the path. The build then fails because a search for a file normally found in a directory called "Foo" will be looked for in "\"Foo\"", which doesn't exist.

Simply removing the escaped quotes from the HEADER_SEARCH_PATHS definition doesn't work, leading to paths that need quoting due to space characters but that don't get this quoting (the part of the path after the space appears to simply go missing).

Removing the escaped quotes from the HEADER_SEARCH_PATHS and moving the definitions to the .xcconfig fixes this problem.
Comment 1 Radar WebKit Bug Importer 2018-11-06 10:55:28 PST
<rdar://problem/45849143>
Comment 2 Keith Rollin 2018-11-06 10:58:09 PST
Created attachment 353975 [details]
Patch
Comment 3 mitz 2018-11-06 11:31:45 PST
Comment on attachment 353975 [details]
Patch

rs=me
Comment 4 WebKit Commit Bot 2018-11-06 12:55:02 PST
Comment on attachment 353975 [details]
Patch

Clearing flags on attachment: 353975

Committed r237881: <https://trac.webkit.org/changeset/237881>
Comment 5 WebKit Commit Bot 2018-11-06 12:55:04 PST
All reviewed patches have been landed.  Closing bug.