-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
We provide CA_BUILD_32_BITS to attempt to build a 32-bit version of oneAPI Construction Kit, but this is fragile and does not always work. Notably, this has stopped working in our internal CI because CMake sometimes fails to pick up libraries required by LLVM. Regular cross compilation which we use for other targets is more reliable. To allow this, add an x86-toolchain.cmake file. This also reveals that our x86 detection was incomplete and would result in oneAPI Construction Kit failing to build on native 32-bit platforms, because CMAKE_SYSTEM_PROCESSOR will not be "x86", it will be e.g. "i686". Account for this in the detection.
- Loading branch information
Showing
5 changed files
with
32 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# Copyright (C) Codeplay Software Limited | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License") with LLVM | ||
# Exceptions; you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# https://github.com/codeplaysoftware/oneapi-construction-kit/blob/main/LICENSE.txt | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT | ||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the | ||
# License for the specific language governing permissions and limitations | ||
# under the License. | ||
# | ||
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | ||
|
||
set(CMAKE_SYSTEM_NAME Linux) | ||
set(CMAKE_SYSTEM_PROCESSOR i686) | ||
|
||
set(TOOLCHAIN_TRIPLE "i686-linux-gnu") | ||
set(CMAKE_C_FLAGS -m32) | ||
set(CMAKE_CXX_FLAGS -m32) | ||
set(PKG_CONFIG_EXECUTABLE "${TOOLCHAIN_TRIPLE}-pkg-config") | ||
|
||
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) | ||
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) | ||
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) | ||
set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY) |