Files
swift-mirror/test/ClangModules/working-directory.swift
Jordan Rose d609aa461d Always serialize absolute search paths.
...and always serialize -working-directory for Clang. (But allow it to be
overridden by a later -Xcc -working-directory.)

Not having this has caused plenty of headaches for the debugger, which is the
primary client of this information. We can still get into bad situations with
search paths that don't exist at all (say, when a built framework is transferred
to another computer), but at least we won't fall over in multi-project workspaces.

This isn't an actual command-line option for a few reasons:

- SourceKit is still using frontend options directly, and they'll need something
  like this to fix rdar://problem/21912068.
- We might want to be more formal about passing this to Clang.
- I don't actually like the existence of such an option for users.

We can revisit this later if the scales tip. Fixing the debugging issue is the
priority.

rdar://problem/21857902

Swift SVN r30500
2015-07-22 20:20:33 +00:00

11 lines
301 B
Swift

// RUN: cd %S/Inputs/ && %target-swift-frontend(mock-sdk: %clang-importer-sdk) -parse -Xcc -I -Xcc custom-modules %s -dump-clang-diagnostics 2>&1 | FileCheck %s
// REQUIRES: objc_interop
import ObjCParseExtras
print(SomeImageName)
// CHECK: clang
// CHECK: '-working-directory' '{{[^"]+}}/Inputs'