-
Notifications
You must be signed in to change notification settings - Fork 285
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
IOS Toolchain for static probe #261
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
# Basic cmake toolchain file for IOS | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I would have simply duplicate the OSX one and change i686 to arm (or armv7). There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I tried that + unix makefiles as the backend but I'm afraid I could not get it to generate arm code, only x86. On my machine at least it's not as simple as just duplicating the OSX toolchain and changing the architecture. It could be my setup is broken for gcc. Feel free to decline this PR as it doesn't really fit your requirements. |
||
# Assumptions: toolchain is in path, $SYSROOT points to the sysroot | ||
# | ||
|
||
# Copyright (c) 2013-2016 Klarälvdalens Datakonsult AB, a KDAB Group company <[email protected]> | ||
# All rights reserved. | ||
# | ||
# Author: Paul Nader <paul.nader at gmail.com> | ||
# | ||
# Redistribution and use in source and binary forms, with or without | ||
# modification, are permitted provided that the following conditions | ||
# are met: | ||
# | ||
# 1. Redistributions of source code must retain the copyright | ||
# notice, this list of conditions and the following disclaimer. | ||
# 2. Redistributions in binary form must reproduce the copyright | ||
# notice, this list of conditions and the following disclaimer in the | ||
# documentation and/or other materials provided with the distribution. | ||
# 3. The name of the author may not be used to endorse or promote products | ||
# derived from this software without specific prior written permission. | ||
# | ||
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR | ||
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES | ||
# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. | ||
# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, | ||
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | ||
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | ||
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF | ||
# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
|
||
# Set the Base SDK (only change the SDKVER value, if for instance, you are building for iOS 10.0): | ||
set(SDKVER "10.0") | ||
set(DEVROOT "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer") | ||
set(SDKROOT "${DEVROOT}/SDKs/iPhoneOS${SDKVER}.sdk") | ||
if(EXISTS ${SDKROOT}) | ||
set(CMAKE_OSX_SYSROOT "${SDKROOT}") | ||
else() | ||
message("Warning, iOS Base SDK path not found: " ${SDKROOT}) | ||
endif() | ||
|
||
set(CMAKE_OSX_ARCHITECTURES "$(ARCHS_STANDARD_32_BIT)") | ||
|
||
set(CMAKE_XCODE_EFFECTIVE_PLATFORMS "-iphoneos") | ||
set(CMAKE_MACOSX_BUNDLE YES) | ||
set(CMAKE_XCODE_ATTRIBUTE_CODE_SIGNING_REQUIRED "NO") | ||
set(CMAKE_XCODE_ATTRIBUTE_DEAD_CODE_STRIPPING "NO") | ||
set(CMAKE_XCODE_ATTRIBUTE_ENABLE_BITCODE "NO") | ||
set(CMAKE_XCODE_ATTRIBUTE_PRESERVE_DEAD_CODE_INITS_AND_TERMS "YES") | ||
set(CMAKE_XCODE_ATTRIBUTE_VALID_ARCHS "armv7") | ||
|
||
set(CMAKE_SYSTEM_NAME "Linux") | ||
set(CMAKE_SYSTEM_PROCESSOR "armv7") | ||
set(CMAKE_C_COMPILER clang) | ||
set(CMAKE_CXX_COMPILER clang++) | ||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --sysroot=$ENV{SYSROOT}") | ||
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} --sysroot=$ENV{SYSROOT}") | ||
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} --sysroot=$ENV{SYSROOT}") | ||
set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} --sysroot=$ENV{SYSROOT}") | ||
|
||
set(CMAKE_FIND_ROOT_PATH "$ENV{SYSROOT}") | ||
|
||
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) | ||
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) | ||
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If requested changes are done, then a simple: make is needed.