Put modules for 32-bit iOS builds in lib/swift/iphone{os,simulator}/32.

This keeps us from having to deal with fat swiftmodules for now.
In the long run we're hoping to solve this problem with build configurations,
so that a single module file can support multiple architectures.
(See <rdar://problem/15056323>)

<rdar://problem/15204953>

Swift SVN r13135
This commit is contained in:
Jordan Rose
2014-01-30 03:26:50 +00:00
parent d69b305200
commit d0d4286d21
8 changed files with 34 additions and 32 deletions

View File

@@ -36,27 +36,29 @@ void CompilerInvocation::setMainExecutablePath(StringRef Path) {
llvm::sys::path::remove_filename(LibPath); // Remove /swift
llvm::sys::path::remove_filename(LibPath); // Remove /bin
llvm::sys::path::append(LibPath, "lib", "swift");
setRuntimeIncludePath(LibPath.str());
setRuntimeResourcePath(LibPath.str());
}
void CompilerInvocation::setRuntimeIncludePath(StringRef Path) {
llvm::SmallString<128> LibPath(Path);
SearchPathOpts.RuntimeIncludePath = LibPath.str();
updateRuntimeImportPath();
void CompilerInvocation::setRuntimeResourcePath(StringRef Path) {
SearchPathOpts.RuntimeResourcePath = Path;
updateRuntimeLibraryPath();
}
void CompilerInvocation::updateRuntimeImportPath() {
llvm::SmallString<128> LibPath(SearchPathOpts.RuntimeIncludePath);
void CompilerInvocation::updateRuntimeLibraryPath() {
llvm::SmallString<128> LibPath(SearchPathOpts.RuntimeResourcePath);
llvm::Triple Triple(IRGenOpts.Triple);
llvm::sys::path::append(LibPath, getPlatformNameForTriple(Triple));
SearchPathOpts.RuntimeLibraryPath = LibPath.str();
SearchPathOpts.RuntimeImportPath = LibPath.str();
if (Triple.isArch32Bit())
llvm::sys::path::append(LibPath, "32");
SearchPathOpts.RuntimeLibraryImportPath = LibPath.str();
}
void CompilerInvocation::setTargetTriple(StringRef Triple) {
IRGenOpts.Triple = Triple.str();
updateRuntimeImportPath();
updateRuntimeLibraryPath();
}
static bool ParseFrontendArgs(FrontendOptions &Opts, ArgList &Args,
@@ -697,9 +699,6 @@ bool CompilerInvocation::parseArgs(ArrayRef<const char *> Args,
return true;
}
// Target options may have changed this path.
updateRuntimeImportPath();
if (ParseDiagnosticArgs(DiagnosticOpts, *ParsedArgs, Diags)) {
return true;
}