Skip to content

[build-script] Isolate CMake from the system #32437

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jun 17, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/Driver/Driver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1964,6 +1964,7 @@ void Driver::buildActions(SmallVectorImpl<const Action *> &TopLevelActions,
}
case file_types::TY_AutolinkFile:
case file_types::TY_Object:
case file_types::TY_TBD:
// Object inputs are only okay if linking.
if (OI.shouldLink()) {
AllLinkerInputs.push_back(Current);
Expand All @@ -1987,7 +1988,6 @@ void Driver::buildActions(SmallVectorImpl<const Action *> &TopLevelActions,
case file_types::TY_IndexData:
case file_types::TY_PCH:
case file_types::TY_ImportedModules:
case file_types::TY_TBD:
case file_types::TY_ModuleTrace:
case file_types::TY_YAMLOptRecord:
case file_types::TY_BitstreamOptRecord:
Expand Down
5 changes: 5 additions & 0 deletions utils/build-script
Original file line number Diff line number Diff line change
Expand Up @@ -701,6 +701,11 @@ class BuildScriptInvocation(object):
"--host-lipo", toolchain.lipo,
]

# Isolate build from the system; Darwin toolchains build against SDKs.
args.extra_cmake_options.append(
'-DCMAKE_IGNORE_PATH=/usr/lib;/usr/local/lib;/lib'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add to the comment here what type of problems result from us not doing this?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or you know what. I think this is pretty common sense. Nm.

)

if toolchain.libtool is not None:
impl_args += [
"--host-libtool", toolchain.libtool,
Expand Down
1 change: 0 additions & 1 deletion utils/build-script-impl
Original file line number Diff line number Diff line change
Expand Up @@ -1942,7 +1942,6 @@ for host in "${ALL_HOSTS[@]}"; do
"${cmake_options[@]}"

-DSQLite3_INCLUDE_DIR:PATH="$(xcrun -sdk macosx -show-sdk-path)/usr/include"
-DSQLite3_LIBRARY:PATH="/usr/lib/libsqlite3.dylib"
)
fi
;;
Expand Down