Skip to content

Commit 5bf4da8

Browse files
committed
SILOptimizer: avoid trawling through the directories for includes
Use the include search path for the header search rather than constructing the path using relative paths. This is important for getting the interop to work properly as well.
1 parent 17f1cf9 commit 5bf4da8

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

cmake/modules/AddSwift.cmake

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -779,6 +779,7 @@ function(add_libswift name)
779779
"-parse-as-library" ${sources}
780780
"-wmo" ${libswift_compile_options}
781781
"-I" "${SWIFT_SOURCE_DIR}/include/swift"
782+
"-I" "${SWIFT_SOURCE_DIR}/include"
782783
"-I" "${build_dir}"
783784
COMMENT "Building libswift module ${module}")
784785

include/swift/SILOptimizer/OptimizerBridging.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
#ifndef SWIFT_SILOPTIMIZER_OPTIMIZERBRIDGING_H
1414
#define SWIFT_SILOPTIMIZER_OPTIMIZERBRIDGING_H
1515

16-
#include "../SIL/SILBridging.h"
16+
#include "swift/SIL/SILBridging.h"
1717

1818
SWIFT_BEGIN_NULLABILITY_ANNOTATIONS
1919

0 commit comments

Comments
 (0)