summaryrefslogtreecommitdiff
path: root/deps/gyp/test/no-cpp
diff options
context:
space:
mode:
Diffstat (limited to 'deps/gyp/test/no-cpp')
-rw-r--r--deps/gyp/test/no-cpp/gyptest-no-cpp.py51
-rw-r--r--deps/gyp/test/no-cpp/src/call-f-main.c2
-rw-r--r--deps/gyp/test/no-cpp/src/empty-main.c1
-rw-r--r--deps/gyp/test/no-cpp/src/f.cc3
-rw-r--r--deps/gyp/test/no-cpp/src/test.gyp25
5 files changed, 0 insertions, 82 deletions
diff --git a/deps/gyp/test/no-cpp/gyptest-no-cpp.py b/deps/gyp/test/no-cpp/gyptest-no-cpp.py
deleted file mode 100644
index d37e3c194b..0000000000
--- a/deps/gyp/test/no-cpp/gyptest-no-cpp.py
+++ /dev/null
@@ -1,51 +0,0 @@
-#!/usr/bin/env python
-
-# 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.
-
-"""
-Checks that C-only targets aren't linked against libstdc++.
-"""
-
-import TestGyp
-
-import re
-import subprocess
-import sys
-
-# set |match| to ignore build stderr output.
-test = TestGyp.TestGyp(match = lambda a, b: True)
-if sys.platform != 'win32' and test.format != 'make':
- # TODO: This doesn't pass with make.
- # TODO: Does a test like this make sense with Windows?
-
- CHDIR = 'src'
- test.run_gyp('test.gyp', chdir=CHDIR)
- test.build('test.gyp', 'no_cpp', chdir=CHDIR)
-
- def LinksLibStdCpp(path):
- path = test.built_file_path(path, chdir=CHDIR)
- if sys.platform == 'darwin':
- proc = subprocess.Popen(['otool', '-L', path], stdout=subprocess.PIPE)
- else:
- proc = subprocess.Popen(['ldd', path], stdout=subprocess.PIPE)
- output = proc.communicate()[0]
- assert not proc.returncode
- return 'libstdc++' in output or 'libc++' in output
-
- if LinksLibStdCpp('no_cpp'):
- test.fail_test()
-
- build_error_code = {
- 'xcode': [1, 65], # 1 for xcode 3, 65 for xcode 4 (see `man sysexits`)
- 'make': 2,
- 'ninja': 1,
- 'cmake': 0, # CMake picks the compiler driver based on transitive checks.
- 'xcode-ninja': [1, 65],
- }[test.format]
-
- test.build('test.gyp', 'no_cpp_dep_on_cc_lib', chdir=CHDIR,
- status=build_error_code)
-
- test.pass_test()
diff --git a/deps/gyp/test/no-cpp/src/call-f-main.c b/deps/gyp/test/no-cpp/src/call-f-main.c
deleted file mode 100644
index 8b95c5910e..0000000000
--- a/deps/gyp/test/no-cpp/src/call-f-main.c
+++ /dev/null
@@ -1,2 +0,0 @@
-void* f();
-int main() { f(); }
diff --git a/deps/gyp/test/no-cpp/src/empty-main.c b/deps/gyp/test/no-cpp/src/empty-main.c
deleted file mode 100644
index 237c8ce181..0000000000
--- a/deps/gyp/test/no-cpp/src/empty-main.c
+++ /dev/null
@@ -1 +0,0 @@
-int main() {}
diff --git a/deps/gyp/test/no-cpp/src/f.cc b/deps/gyp/test/no-cpp/src/f.cc
deleted file mode 100644
index 02f50f21a0..0000000000
--- a/deps/gyp/test/no-cpp/src/f.cc
+++ /dev/null
@@ -1,3 +0,0 @@
-extern "C" { void* f(); }
-
-void* f() { return new int; }
diff --git a/deps/gyp/test/no-cpp/src/test.gyp b/deps/gyp/test/no-cpp/src/test.gyp
deleted file mode 100644
index 417015ec80..0000000000
--- a/deps/gyp/test/no-cpp/src/test.gyp
+++ /dev/null
@@ -1,25 +0,0 @@
-# Copyright (c) 2013 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': 'no_cpp',
- 'type': 'executable',
- 'sources': [ 'empty-main.c' ],
- },
- # A static_library with a cpp file and a linkable with only .c files
- # depending on it causes a linker error:
- {
- 'target_name': 'cpp_lib',
- 'type': 'static_library',
- 'sources': [ 'f.cc' ],
- },
- {
- 'target_name': 'no_cpp_dep_on_cc_lib',
- 'type': 'executable',
- 'dependencies': [ 'cpp_lib' ],
- 'sources': [ 'call-f-main.c' ],
- },
- ],
-}