From 71a69d9b68c06879f36d8c1919790431da9981d7 Mon Sep 17 00:00:00 2001 From: Jakub Tomanik Date: Wed, 19 Dec 2018 14:01:29 -0800 Subject: [PATCH] Fix building RocksDB for iOS (#4687) Summary: This PR contains the following fixes: 1. Fixing Makefile to support non-default locations of developer tools 2. Fixing compile error using a patch from https://github.com/facebook/rocksdb/pull/4007 Pull Request resolved: https://github.com/facebook/rocksdb/pull/4687 Differential Revision: D13287263 Pulled By: riversand963 fbshipit-source-id: 4525eb42ba7b6f82af5f9bfb8e52fa4024e27ccc --- Makefile | 3 ++- db/db_impl.cc | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 6e24b2f59..0c6c2c463 100644 --- a/Makefile +++ b/Makefile @@ -1935,7 +1935,8 @@ commit_prereq: build_tools/rocksdb-lego-determinator \ ifeq ($(PLATFORM), IOS) # For iOS, create universal object files to be used on both the simulator and # a device. -PLATFORMSROOT=/Applications/Xcode.app/Contents/Developer/Platforms +XCODEROOT=$(shell xcode-select -print-path) +PLATFORMSROOT=$(XCODEROOT)/Platforms SIMULATORROOT=$(PLATFORMSROOT)/iPhoneSimulator.platform/Developer DEVICEROOT=$(PLATFORMSROOT)/iPhoneOS.platform/Developer IOSVERSION=$(shell defaults read $(PLATFORMSROOT)/iPhoneOS.platform/version CFBundleShortVersionString) diff --git a/db/db_impl.cc b/db/db_impl.cc index 4f47de4d5..d94ee76fa 100644 --- a/db/db_impl.cc +++ b/db/db_impl.cc @@ -2923,6 +2923,8 @@ void DumpRocksDBBuildVersion(Logger* log) { ROCKSDB_MINOR, ROCKSDB_PATCH); ROCKS_LOG_HEADER(log, "Git sha %s", rocksdb_build_git_sha); ROCKS_LOG_HEADER(log, "Compile date %s", rocksdb_build_compile_date); +#else + (void)log; // ignore "-Wunused-parameter" #endif }