Merge pull request #261 from compnerd/layout

build: adjust for new build layout
diff --git a/CMakeLists.txt b/CMakeLists.txt
index dfa8eb9..be10f91 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -106,6 +106,7 @@
                     -Xcc -fblocks
 
                     -I${XCTEST_PATH_TO_FOUNDATION_BUILD}/swift
+                    -Fsystem ${XCTEST_PATH_TO_FOUNDATION_BUILD}
                     -Fsystem ${XCTEST_PATH_TO_COREFOUNDATION_BUILD}/System/Library/Frameworks
 
                     # compatibility with Foundation build_script.py
diff --git a/Tests/Functional/lit.cfg b/Tests/Functional/lit.cfg
index 9c38ebd..294fab5 100644
--- a/Tests/Functional/lit.cfg
+++ b/Tests/Functional/lit.cfg
@@ -85,6 +85,8 @@
         '-L', foundation_dir,
         '-I', foundation_dir,
         '-I', os.path.join(foundation_dir, 'swift'),
+        '-Xcc', '-F', '-Xcc', foundation_dir,
+
         '-I', core_foundation_dir,
         '-Xcc', '-F', '-Xcc', os.path.join(core_foundation_dir, 'System', 'Library', 'Frameworks'),
     ])