summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXinliang David Li <davidxl@google.com>2016-06-08 16:21:35 +0000
committerXinliang David Li <davidxl@google.com>2016-06-08 16:21:35 +0000
commitf88d3b9afbb39217d3a8649c5b2549707dd4a559 (patch)
tree076c4324295029da27f05bc4888489d626b32dcb
parent7a03de521086414d37947247009d1169262a5506 (diff)
downloadbcm5719-llvm-f88d3b9afbb39217d3a8649c5b2549707dd4a559.tar.gz
bcm5719-llvm-f88d3b9afbb39217d3a8649c5b2549707dd4a559.zip
[profile] Pass extra build flags (feature enabling macros) to Darwin build
Differential Revision: http://reviews.llvm.org/D21119 llvm-svn: 272162
-rw-r--r--compiler-rt/lib/profile/CMakeLists.txt1
-rw-r--r--compiler-rt/lib/profile/InstrProfilingUtil.c2
2 files changed, 1 insertions, 2 deletions
diff --git a/compiler-rt/lib/profile/CMakeLists.txt b/compiler-rt/lib/profile/CMakeLists.txt
index 5bcdca1297a..996f3beaff4 100644
--- a/compiler-rt/lib/profile/CMakeLists.txt
+++ b/compiler-rt/lib/profile/CMakeLists.txt
@@ -82,6 +82,7 @@ if(APPLE)
STATIC
OS ${PROFILE_SUPPORTED_OS}
ARCHS ${PROFILE_SUPPORTED_ARCH}
+ CFLAGS ${EXTRA_FLAGS}
SOURCES ${PROFILE_SOURCES}
PARENT_TARGET profile)
else()
diff --git a/compiler-rt/lib/profile/InstrProfilingUtil.c b/compiler-rt/lib/profile/InstrProfilingUtil.c
index f97004d41ec..e87ab764044 100644
--- a/compiler-rt/lib/profile/InstrProfilingUtil.c
+++ b/compiler-rt/lib/profile/InstrProfilingUtil.c
@@ -16,9 +16,7 @@
#else
#include <sys/stat.h>
#include <sys/types.h>
-#if defined(__linux__)
#include <unistd.h>
-#endif
#include <fcntl.h>
#include <errno.h>
#endif
OpenPOWER on IntegriCloud