summaryrefslogtreecommitdiffstats
path: root/third_party/python/gyp/test/mac/archs
diff options
context:
space:
mode:
Diffstat (limited to 'third_party/python/gyp/test/mac/archs')
-rw-r--r--third_party/python/gyp/test/mac/archs/empty_main.cc1
-rw-r--r--third_party/python/gyp/test/mac/archs/file.mm1
-rw-r--r--third_party/python/gyp/test/mac/archs/file_a.cc8
-rw-r--r--third_party/python/gyp/test/mac/archs/file_a.h10
-rw-r--r--third_party/python/gyp/test/mac/archs/file_b.cc8
-rw-r--r--third_party/python/gyp/test/mac/archs/file_b.h10
-rw-r--r--third_party/python/gyp/test/mac/archs/file_c.cc11
-rw-r--r--third_party/python/gyp/test/mac/archs/file_d.cc11
-rw-r--r--third_party/python/gyp/test/mac/archs/header.h1
-rw-r--r--third_party/python/gyp/test/mac/archs/my_file.cc4
-rw-r--r--third_party/python/gyp/test/mac/archs/my_main_file.cc9
-rw-r--r--third_party/python/gyp/test/mac/archs/test-archs-multiarch.gyp92
-rw-r--r--third_party/python/gyp/test/mac/archs/test-archs-x86_64.gyp27
-rw-r--r--third_party/python/gyp/test/mac/archs/test-dependencies.gyp92
-rw-r--r--third_party/python/gyp/test/mac/archs/test-no-archs.gyp21
-rw-r--r--third_party/python/gyp/test/mac/archs/test-valid-archs.gyp28
16 files changed, 334 insertions, 0 deletions
diff --git a/third_party/python/gyp/test/mac/archs/empty_main.cc b/third_party/python/gyp/test/mac/archs/empty_main.cc
new file mode 100644
index 0000000000..237c8ce181
--- /dev/null
+++ b/third_party/python/gyp/test/mac/archs/empty_main.cc
@@ -0,0 +1 @@
+int main() {}
diff --git a/third_party/python/gyp/test/mac/archs/file.mm b/third_party/python/gyp/test/mac/archs/file.mm
new file mode 100644
index 0000000000..d0b39d1f6d
--- /dev/null
+++ b/third_party/python/gyp/test/mac/archs/file.mm
@@ -0,0 +1 @@
+MyInt f() { return 0; }
diff --git a/third_party/python/gyp/test/mac/archs/file_a.cc b/third_party/python/gyp/test/mac/archs/file_a.cc
new file mode 100644
index 0000000000..7307873c83
--- /dev/null
+++ b/third_party/python/gyp/test/mac/archs/file_a.cc
@@ -0,0 +1,8 @@
+// Copyright (c) 2014 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.
+
+#include "file_a.h"
+
+void DependentFunctionA() {
+}
diff --git a/third_party/python/gyp/test/mac/archs/file_a.h b/third_party/python/gyp/test/mac/archs/file_a.h
new file mode 100644
index 0000000000..7439d13182
--- /dev/null
+++ b/third_party/python/gyp/test/mac/archs/file_a.h
@@ -0,0 +1,10 @@
+// Copyright (c) 2014 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.
+
+#ifndef _INCLUDED_TEST_MAC_DEPENDENCIES_FILE_A_H_
+#define _INCLUDED_TEST_MAC_DEPENDENCIES_FILE_A_H_
+
+void DependentFunctionA();
+
+#endif // _INCLUDED_TEST_MAC_DEPENDENCIES_FILE_A_H_
diff --git a/third_party/python/gyp/test/mac/archs/file_b.cc b/third_party/python/gyp/test/mac/archs/file_b.cc
new file mode 100644
index 0000000000..72d59cbfb4
--- /dev/null
+++ b/third_party/python/gyp/test/mac/archs/file_b.cc
@@ -0,0 +1,8 @@
+// Copyright (c) 2014 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.
+
+#include "file_b.h"
+
+void DependentFunctionB() {
+}
diff --git a/third_party/python/gyp/test/mac/archs/file_b.h b/third_party/python/gyp/test/mac/archs/file_b.h
new file mode 100644
index 0000000000..eb272ece55
--- /dev/null
+++ b/third_party/python/gyp/test/mac/archs/file_b.h
@@ -0,0 +1,10 @@
+// Copyright (c) 2014 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.
+
+#ifndef _INCLUDED_TEST_MAC_DEPENDENCIES_FILE_B_H_
+#define _INCLUDED_TEST_MAC_DEPENDENCIES_FILE_B_H_
+
+void DependentFunctionB();
+
+#endif // _INCLUDED_TEST_MAC_DEPENDENCIES_FILE_B_H_
diff --git a/third_party/python/gyp/test/mac/archs/file_c.cc b/third_party/python/gyp/test/mac/archs/file_c.cc
new file mode 100644
index 0000000000..ca39f7a671
--- /dev/null
+++ b/third_party/python/gyp/test/mac/archs/file_c.cc
@@ -0,0 +1,11 @@
+// Copyright (c) 2014 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.
+
+#include "file_a.h"
+#include "file_b.h"
+
+void PublicFunctionC() {
+ DependentFunctionA();
+ DependentFunctionB();
+}
diff --git a/third_party/python/gyp/test/mac/archs/file_d.cc b/third_party/python/gyp/test/mac/archs/file_d.cc
new file mode 100644
index 0000000000..c40911cdca
--- /dev/null
+++ b/third_party/python/gyp/test/mac/archs/file_d.cc
@@ -0,0 +1,11 @@
+// Copyright (c) 2014 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.
+
+#include "file_a.h"
+#include "file_b.h"
+
+void PublicFunctionD() {
+ DependentFunctionA();
+ DependentFunctionB();
+}
diff --git a/third_party/python/gyp/test/mac/archs/header.h b/third_party/python/gyp/test/mac/archs/header.h
new file mode 100644
index 0000000000..0716e500c5
--- /dev/null
+++ b/third_party/python/gyp/test/mac/archs/header.h
@@ -0,0 +1 @@
+typedef int MyInt;
diff --git a/third_party/python/gyp/test/mac/archs/my_file.cc b/third_party/python/gyp/test/mac/archs/my_file.cc
new file mode 100644
index 0000000000..94216a74df
--- /dev/null
+++ b/third_party/python/gyp/test/mac/archs/my_file.cc
@@ -0,0 +1,4 @@
+/* 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. */
+int x = 1;
diff --git a/third_party/python/gyp/test/mac/archs/my_main_file.cc b/third_party/python/gyp/test/mac/archs/my_main_file.cc
new file mode 100644
index 0000000000..f1fa06f276
--- /dev/null
+++ b/third_party/python/gyp/test/mac/archs/my_main_file.cc
@@ -0,0 +1,9 @@
+/* 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. */
+#include <stdio.h>
+extern int x;
+int main() {
+ printf("hello, world %d\n", x);
+}
+
diff --git a/third_party/python/gyp/test/mac/archs/test-archs-multiarch.gyp b/third_party/python/gyp/test/mac/archs/test-archs-multiarch.gyp
new file mode 100644
index 0000000000..567e8a6653
--- /dev/null
+++ b/third_party/python/gyp/test/mac/archs/test-archs-multiarch.gyp
@@ -0,0 +1,92 @@
+# 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': [
+ {
+ 'target_name': 'static_32_64',
+ 'type': 'static_library',
+ 'sources': [ 'my_file.cc' ],
+ 'xcode_settings': {
+ 'ARCHS': [ 'i386', 'x86_64' ],
+ },
+ },
+ {
+ 'target_name': 'shared_32_64',
+ 'type': 'shared_library',
+ 'sources': [ 'my_file.cc' ],
+ 'xcode_settings': {
+ 'ARCHS': [ 'i386', 'x86_64' ],
+ },
+ },
+ {
+ 'target_name': 'shared_32_64_bundle',
+ 'product_name': 'My Framework',
+ 'type': 'shared_library',
+ 'mac_bundle': 1,
+ 'sources': [ 'my_file.cc' ],
+ 'xcode_settings': {
+ 'ARCHS': [ 'i386', 'x86_64' ],
+ },
+ },
+ {
+ 'target_name': 'module_32_64',
+ 'type': 'loadable_module',
+ 'sources': [ 'my_file.cc' ],
+ 'xcode_settings': {
+ 'ARCHS': [ 'i386', 'x86_64' ],
+ },
+ },
+ {
+ 'target_name': 'module_32_64_bundle',
+ 'product_name': 'My Bundle',
+ 'type': 'loadable_module',
+ 'mac_bundle': 1,
+ 'sources': [ 'my_file.cc' ],
+ 'xcode_settings': {
+ 'ARCHS': [ 'i386', 'x86_64' ],
+ },
+ },
+ {
+ 'target_name': 'exe_32_64',
+ 'type': 'executable',
+ 'sources': [ 'empty_main.cc' ],
+ 'xcode_settings': {
+ 'ARCHS': [ 'i386', 'x86_64' ],
+ },
+ },
+ {
+ 'target_name': 'exe_32_64_bundle',
+ 'product_name': 'Test App',
+ 'type': 'executable',
+ 'mac_bundle': 1,
+ 'sources': [ 'empty_main.cc' ],
+ 'xcode_settings': {
+ 'ARCHS': [ 'i386', 'x86_64' ],
+ },
+ },
+ # This only needs to compile.
+ {
+ 'target_name': 'precompiled_prefix_header_mm_32_64',
+ 'type': 'shared_library',
+ 'sources': [ 'file.mm', ],
+ 'xcode_settings': {
+ 'GCC_PREFIX_HEADER': 'header.h',
+ 'GCC_PRECOMPILE_PREFIX_HEADER': 'YES',
+ },
+ },
+ # This does not compile but should not cause generation errors.
+ {
+ 'target_name': 'exe_32_64_no_sources',
+ 'type': 'executable',
+ 'dependencies': [
+ 'static_32_64',
+ ],
+ 'sources': [],
+ 'xcode_settings': {
+ 'ARCHS': ['i386', 'x86_64'],
+ },
+ },
+ ]
+}
diff --git a/third_party/python/gyp/test/mac/archs/test-archs-x86_64.gyp b/third_party/python/gyp/test/mac/archs/test-archs-x86_64.gyp
new file mode 100644
index 0000000000..d11a896273
--- /dev/null
+++ b/third_party/python/gyp/test/mac/archs/test-archs-x86_64.gyp
@@ -0,0 +1,27 @@
+# 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': [
+ {
+ 'target_name': 'lib',
+ 'product_name': 'Test64',
+ 'type': 'static_library',
+ 'sources': [ 'my_file.cc' ],
+ 'xcode_settings': {
+ 'ARCHS': [ 'x86_64' ],
+ },
+ },
+ {
+ 'target_name': 'exe',
+ 'product_name': 'Test64',
+ 'type': 'executable',
+ 'dependencies': [ 'lib' ],
+ 'sources': [ 'my_main_file.cc' ],
+ 'xcode_settings': {
+ 'ARCHS': [ 'x86_64' ],
+ },
+ },
+ ]
+}
diff --git a/third_party/python/gyp/test/mac/archs/test-dependencies.gyp b/third_party/python/gyp/test/mac/archs/test-dependencies.gyp
new file mode 100644
index 0000000000..0431f5f2f4
--- /dev/null
+++ b/third_party/python/gyp/test/mac/archs/test-dependencies.gyp
@@ -0,0 +1,92 @@
+# Copyright (c) 2014 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.
+
+{
+ 'target_defaults': {
+ 'xcode_settings': {
+ 'ARCHS': ['i386', 'x86_64'],
+ },
+ },
+ 'targets': [
+ {
+ 'target_name': 'target_a',
+ 'type': 'static_library',
+ 'sources': [
+ 'file_a.cc',
+ 'file_a.h',
+ ],
+ },
+ {
+ 'target_name': 'target_b',
+ 'type': 'static_library',
+ 'sources': [
+ 'file_b.cc',
+ 'file_b.h',
+ ],
+ },
+ {
+ 'target_name': 'target_c_standalone_helper',
+ 'type': 'loadable_module',
+ 'hard_dependency': 1,
+ 'dependencies': [
+ 'target_a',
+ 'target_b',
+ ],
+ 'sources': [
+ 'file_c.cc',
+ ],
+ },
+ {
+ 'target_name': 'target_c_standalone',
+ 'type': 'none',
+ 'dependencies': [
+ 'target_c_standalone_helper',
+ ],
+ 'actions': [
+ {
+ 'action_name': 'Package C',
+ 'inputs': [],
+ 'outputs': [
+ '<(PRODUCT_DIR)/libc_standalone.a',
+ ],
+ 'action': [
+ 'touch',
+ '<@(_outputs)',
+ ],
+ },
+ ],
+ },
+ {
+ 'target_name': 'target_d_standalone_helper',
+ 'type': 'shared_library',
+ 'dependencies': [
+ 'target_a',
+ 'target_b',
+ ],
+ 'sources': [
+ 'file_d.cc',
+ ],
+ },
+ {
+ 'target_name': 'target_d_standalone',
+ 'type': 'none',
+ 'dependencies': [
+ 'target_d_standalone_helper',
+ ],
+ 'actions': [
+ {
+ 'action_name': 'Package D',
+ 'inputs': [],
+ 'outputs': [
+ '<(PRODUCT_DIR)/libd_standalone.a',
+ ],
+ 'action': [
+ 'touch',
+ '<@(_outputs)',
+ ],
+ },
+ ],
+ }
+ ],
+}
diff --git a/third_party/python/gyp/test/mac/archs/test-no-archs.gyp b/third_party/python/gyp/test/mac/archs/test-no-archs.gyp
new file mode 100644
index 0000000000..8f3b6b47cc
--- /dev/null
+++ b/third_party/python/gyp/test/mac/archs/test-no-archs.gyp
@@ -0,0 +1,21 @@
+# 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': [
+ {
+ 'target_name': 'lib',
+ 'product_name': 'Test',
+ 'type': 'static_library',
+ 'sources': [ 'my_file.cc' ],
+ },
+ {
+ 'target_name': 'exe',
+ 'product_name': 'Test',
+ 'type': 'executable',
+ 'dependencies': [ 'lib' ],
+ 'sources': [ 'my_main_file.cc' ],
+ },
+ ]
+}
diff --git a/third_party/python/gyp/test/mac/archs/test-valid-archs.gyp b/third_party/python/gyp/test/mac/archs/test-valid-archs.gyp
new file mode 100644
index 0000000000..c90ec1fe9b
--- /dev/null
+++ b/third_party/python/gyp/test/mac/archs/test-valid-archs.gyp
@@ -0,0 +1,28 @@
+# Copyright (c) 2014 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': [
+ {
+ 'target_name': 'lib',
+ 'product_name': 'Test',
+ 'type': 'static_library',
+ 'sources': [ 'my_file.cc' ],
+ 'xcode_settings': {
+ 'ARCHS': ['i386', 'x86_64', 'unknown-arch'],
+ 'VALID_ARCHS': ['x86_64'],
+ },
+ },
+ {
+ 'target_name': 'exe',
+ 'product_name': 'Test',
+ 'type': 'executable',
+ 'dependencies': [ 'lib' ],
+ 'sources': [ 'my_main_file.cc' ],
+ 'xcode_settings': {
+ 'ARCHS': ['i386', 'x86_64', 'unknown-arch'],
+ 'VALID_ARCHS': ['x86_64'],
+ },
+ }]
+}