• Param Reddy's avatar
    Fix iOS cc_library build for protobuf. · 3130ce03
    Param Reddy authored
    The SDK and os versions were hard coded.  Archs were mixed up.
    Because of this,  Was getting errors with latest SDK:
    clang: warning: no such sysroot directory: '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.2.sdk/' [-Wmissing-sysroot]
    clang: warning: no such sysroot directory: '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.2.sdk/' [-Wmissing-sysroot]
    clang: warning: no such sysroot directory: '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.2.sdk/' [-Wmissing-sysroot]
    In file included from external/com_google_protobuf/src/google/protobuf/io/printer.cc:35:
    In file included from external/com_google_protobuf/src/google/protobuf/io/printer.h:40:
    In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/string:470:
    In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/string_view:171:
    In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/__string:56:
    In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/algorithm:638:
    In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/cstring:61:
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/string.h:61:15: fatal error: 'string.h' file not found
                  ^~~~~~~~~~
                  1 error generated.
    
    Currently none of these are needed when using bazel with https://github.com/bazelbuild/rules_apple.
    -target arm64-apple-ios is passed properly to clang.  So -arch armv7 etc are not needed.
    OS_IOS is not used anywhere.
    Sources have:  GOOGLE_PROTOBUF_NO_THREADLOCAL defined in src/google/protobuf/stubs/platform_macros.h for iOS.  So __thread= is not needed.  In fact now that bazel is using C++11 by default,  __thread should ideally be moved to thread_local.
    -miphoneos-version-min is passed by rules_apple.
    3130ce03
Name
Last commit
Last update
benchmarks Loading commit data...
cmake Loading commit data...
conformance Loading commit data...
csharp Loading commit data...
docs Loading commit data...
editors Loading commit data...
examples Loading commit data...
java Loading commit data...
javanano Loading commit data...
jenkins Loading commit data...
js Loading commit data...
kokoro Loading commit data...
m4 Loading commit data...
more_tests Loading commit data...
objectivec Loading commit data...
php Loading commit data...
protoc-artifacts Loading commit data...
python Loading commit data...
ruby Loading commit data...
src Loading commit data...
third_party Loading commit data...
util/python Loading commit data...
.gitignore Loading commit data...
.gitmodules Loading commit data...
.travis.yml Loading commit data...
BUILD Loading commit data...
CHANGES.txt Loading commit data...
CONTRIBUTORS.txt Loading commit data...
LICENSE Loading commit data...
Makefile.am Loading commit data...
Protobuf.podspec Loading commit data...
README.md Loading commit data...
WORKSPACE Loading commit data...
appveyor.bat Loading commit data...
appveyor.yml Loading commit data...
autogen.sh Loading commit data...
composer.json Loading commit data...
configure.ac Loading commit data...
generate_changelog.py Loading commit data...
generate_descriptor_proto.sh Loading commit data...
gmock.BUILD Loading commit data...
post_process_dist.sh Loading commit data...
protobuf-lite.pc.in Loading commit data...
protobuf.bzl Loading commit data...
protobuf.pc.in Loading commit data...
six.BUILD Loading commit data...
tests.sh Loading commit data...
update_file_lists.sh Loading commit data...