summaryrefslogtreecommitdiffstats
path: root/media/webrtc/trunk/tools/gyp/test/mac/objc-gc
diff options
context:
space:
mode:
authorMatt A. Tobin <mattatobin@localhost.localdomain>2018-02-02 04:16:08 -0500
committerMatt A. Tobin <mattatobin@localhost.localdomain>2018-02-02 04:16:08 -0500
commit5f8de423f190bbb79a62f804151bc24824fa32d8 (patch)
tree10027f336435511475e392454359edea8e25895d /media/webrtc/trunk/tools/gyp/test/mac/objc-gc
parent49ee0794b5d912db1f95dce6eb52d781dc210db5 (diff)
downloadUXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.gz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.lz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.xz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.zip
Add m-esr52 at 52.6.0
Diffstat (limited to 'media/webrtc/trunk/tools/gyp/test/mac/objc-gc')
-rw-r--r--media/webrtc/trunk/tools/gyp/test/mac/objc-gc/c-file.c1
-rw-r--r--media/webrtc/trunk/tools/gyp/test/mac/objc-gc/cc-file.cc1
-rw-r--r--media/webrtc/trunk/tools/gyp/test/mac/objc-gc/main.m6
-rw-r--r--media/webrtc/trunk/tools/gyp/test/mac/objc-gc/needs-gc-mm.mm1
-rw-r--r--media/webrtc/trunk/tools/gyp/test/mac/objc-gc/needs-gc.m1
-rw-r--r--media/webrtc/trunk/tools/gyp/test/mac/objc-gc/test.gyp102
6 files changed, 112 insertions, 0 deletions
diff --git a/media/webrtc/trunk/tools/gyp/test/mac/objc-gc/c-file.c b/media/webrtc/trunk/tools/gyp/test/mac/objc-gc/c-file.c
new file mode 100644
index 000000000..2855a00ea
--- /dev/null
+++ b/media/webrtc/trunk/tools/gyp/test/mac/objc-gc/c-file.c
@@ -0,0 +1 @@
+void c_fun() {}
diff --git a/media/webrtc/trunk/tools/gyp/test/mac/objc-gc/cc-file.cc b/media/webrtc/trunk/tools/gyp/test/mac/objc-gc/cc-file.cc
new file mode 100644
index 000000000..71e47a012
--- /dev/null
+++ b/media/webrtc/trunk/tools/gyp/test/mac/objc-gc/cc-file.cc
@@ -0,0 +1 @@
+void cc_fun() {}
diff --git a/media/webrtc/trunk/tools/gyp/test/mac/objc-gc/main.m b/media/webrtc/trunk/tools/gyp/test/mac/objc-gc/main.m
new file mode 100644
index 000000000..1a87f8e70
--- /dev/null
+++ b/media/webrtc/trunk/tools/gyp/test/mac/objc-gc/main.m
@@ -0,0 +1,6 @@
+#import <Foundation/Foundation.h>
+
+int main() {
+ printf("gc on: %d\n", [NSGarbageCollector defaultCollector] != NULL);
+ return 0;
+}
diff --git a/media/webrtc/trunk/tools/gyp/test/mac/objc-gc/needs-gc-mm.mm b/media/webrtc/trunk/tools/gyp/test/mac/objc-gc/needs-gc-mm.mm
new file mode 100644
index 000000000..fc3fee9f3
--- /dev/null
+++ b/media/webrtc/trunk/tools/gyp/test/mac/objc-gc/needs-gc-mm.mm
@@ -0,0 +1 @@
+void objcpp_fun() { }
diff --git a/media/webrtc/trunk/tools/gyp/test/mac/objc-gc/needs-gc.m b/media/webrtc/trunk/tools/gyp/test/mac/objc-gc/needs-gc.m
new file mode 100644
index 000000000..ca77976b1
--- /dev/null
+++ b/media/webrtc/trunk/tools/gyp/test/mac/objc-gc/needs-gc.m
@@ -0,0 +1 @@
+void objc_fun() { }
diff --git a/media/webrtc/trunk/tools/gyp/test/mac/objc-gc/test.gyp b/media/webrtc/trunk/tools/gyp/test/mac/objc-gc/test.gyp
new file mode 100644
index 000000000..4d827c1b3
--- /dev/null
+++ b/media/webrtc/trunk/tools/gyp/test/mac/objc-gc/test.gyp
@@ -0,0 +1,102 @@
+# Copyright (c) 2012 Google Inc. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+{
+ 'targets': [
+ # For some reason, static_library targets that are built with gc=required
+ # and then linked to executables that don't use gc, the linker doesn't
+ # complain. For shared_libraries it does, so use that.
+ {
+ 'target_name': 'no_gc_lib',
+ 'type': 'shared_library',
+ 'sources': [
+ 'c-file.c',
+ 'cc-file.cc',
+ 'needs-gc-mm.mm',
+ 'needs-gc.m',
+ ],
+ },
+ {
+ 'target_name': 'gc_lib',
+ 'type': 'shared_library',
+ 'sources': [
+ 'c-file.c',
+ 'cc-file.cc',
+ 'needs-gc-mm.mm',
+ 'needs-gc.m',
+ ],
+ 'xcode_settings': {
+ 'GCC_ENABLE_OBJC_GC': 'supported',
+ },
+ },
+ {
+ 'target_name': 'gc_req_lib',
+ 'type': 'shared_library',
+ 'sources': [
+ 'c-file.c',
+ 'cc-file.cc',
+ 'needs-gc-mm.mm',
+ 'needs-gc.m',
+ ],
+ 'xcode_settings': {
+ 'GCC_ENABLE_OBJC_GC': 'required',
+ },
+ },
+
+ {
+ 'target_name': 'gc_exe_fails',
+ 'type': 'executable',
+ 'sources': [ 'main.m' ],
+ 'dependencies': [ 'no_gc_lib' ],
+ 'xcode_settings': {
+ 'GCC_ENABLE_OBJC_GC': 'required',
+ },
+ 'libraries': [ 'Foundation.framework' ],
+ },
+ {
+ 'target_name': 'gc_req_exe',
+ 'type': 'executable',
+ 'sources': [ 'main.m' ],
+ 'dependencies': [ 'gc_lib' ],
+ 'xcode_settings': {
+ 'GCC_ENABLE_OBJC_GC': 'required',
+ },
+ 'libraries': [ 'Foundation.framework' ],
+ },
+ {
+ 'target_name': 'gc_exe_req_lib',
+ 'type': 'executable',
+ 'sources': [ 'main.m' ],
+ 'dependencies': [ 'gc_req_lib' ],
+ 'xcode_settings': {
+ 'GCC_ENABLE_OBJC_GC': 'supported',
+ },
+ 'libraries': [ 'Foundation.framework' ],
+ },
+ {
+ 'target_name': 'gc_exe',
+ 'type': 'executable',
+ 'sources': [ 'main.m' ],
+ 'dependencies': [ 'gc_lib' ],
+ 'xcode_settings': {
+ 'GCC_ENABLE_OBJC_GC': 'supported',
+ },
+ 'libraries': [ 'Foundation.framework' ],
+ },
+ {
+ 'target_name': 'gc_off_exe_req_lib',
+ 'type': 'executable',
+ 'sources': [ 'main.m' ],
+ 'dependencies': [ 'gc_req_lib' ],
+ 'libraries': [ 'Foundation.framework' ],
+ },
+ {
+ 'target_name': 'gc_off_exe',
+ 'type': 'executable',
+ 'sources': [ 'main.m' ],
+ 'dependencies': [ 'gc_lib' ],
+ 'libraries': [ 'Foundation.framework' ],
+ },
+ ],
+}
+