summaryrefslogtreecommitdiff
path: root/sal
diff options
context:
space:
mode:
authorTor Lillqvist <tml@iki.fi>2013-09-03 16:50:50 +0300
committerTor Lillqvist <tml@iki.fi>2013-09-03 17:38:53 +0300
commitd81da41c9d121f5ec452545b686a71c51a117eed (patch)
tree33e3eb3987f0c0848012e570ec783667d3a02816 /sal
parentdd3293b83aa7bdb5688005d3906a0de536631487 (diff)
Don't compile all of the sal library as Objective-C++ on OS X after all
I doubt it affects ABI, but let's not take the risk. Instead, just compile the uunxapi.cxx file (which has no public API) as Objective-C++, as that is now the only one where Objective-C API is used. This reverts part of d22c94dbf16d18bce39f060aa21f3083169426ca Change-Id: I240dbb36529c419b81b062f6fe860a9e621c2400
Diffstat (limited to 'sal')
-rw-r--r--sal/Library_sal.mk14
-rw-r--r--sal/osl/unx/file.cxx2
-rw-r--r--sal/osl/unx/uunxapi.cxx2
-rw-r--r--sal/osl/unx/uunxapi.mm1
4 files changed, 15 insertions, 4 deletions
diff --git a/sal/Library_sal.mk b/sal/Library_sal.mk
index 093546fc9e0d..8024e3f5775f 100644
--- a/sal/Library_sal.mk
+++ b/sal/Library_sal.mk
@@ -123,7 +123,7 @@ $(eval $(call gb_Library_add_cobjects,sal,\
sal/osl/all/filepath \
))
-ifneq (,$(filter IOS MACOSX,$(OS)))
+ifeq ($(OS),IOS)
$(eval $(call gb_Library_add_cxxflags,sal,\
$(gb_OBJCXXFLAGS) \
))
@@ -162,7 +162,6 @@ $(eval $(call gb_Library_add_exception_objects,sal,\
sal/osl/unx/process \
sal/osl/unx/process_impl \
$(if $(filter DESKTOP,$(BUILD_TYPE)), sal/osl/unx/salinit) \
- sal/osl/unx/uunxapi \
))
$(eval $(call gb_Library_add_cobjects,sal,\
sal/osl/unx/mutex \
@@ -183,6 +182,17 @@ $(eval $(call gb_Library_add_cobject,sal,sal/osl/unx/signal, \
-DSAL_ENABLE_CRASH_REPORT) \
))
+# Note that the uunxapi.mm file just includes the uunxapi.cxx one
+ifeq ($(OS),MACOSX)
+$(eval $(call gb_Library_add_objcxxobjects,sal,\
+ sal/osl/unx/uunxapi \
+))
+else
+$(eval $(call gb_Library_add_exception_objects,sal,\
+ sal/osl/unx/uunxapi \
+))
+endif
+
ifneq ($(filter $(OS),MACOSX IOS),)
$(eval $(call gb_Library_add_exception_objects,sal,\
sal/osl/unx/osxlocale \
diff --git a/sal/osl/unx/file.cxx b/sal/osl/unx/file.cxx
index 4ae6ef641ba0..571a79c82998 100644
--- a/sal/osl/unx/file.cxx
+++ b/sal/osl/unx/file.cxx
@@ -1,4 +1,4 @@
-/* -*- Mode: ObjC; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
* This file is part of the LibreOffice project.
*
diff --git a/sal/osl/unx/uunxapi.cxx b/sal/osl/unx/uunxapi.cxx
index 316f75a3bae1..d4116456b083 100644
--- a/sal/osl/unx/uunxapi.cxx
+++ b/sal/osl/unx/uunxapi.cxx
@@ -1,4 +1,4 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/* -*- Mode: ObjC; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
* This file is part of the LibreOffice project.
*
diff --git a/sal/osl/unx/uunxapi.mm b/sal/osl/unx/uunxapi.mm
new file mode 100644
index 000000000000..5a7e17f34491
--- /dev/null
+++ b/sal/osl/unx/uunxapi.mm
@@ -0,0 +1 @@
+#include "uunxapi.cxx"