From 26a029d407be480d791972afb5975cf62c9360a6 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Fri, 19 Apr 2024 02:47:55 +0200 Subject: Adding upstream version 124.0.1. Signed-off-by: Daniel Baumann --- .../python/gyp/test/no-cpp/src/call-f-main.c | 2 ++ .../python/gyp/test/no-cpp/src/empty-main.c | 1 + third_party/python/gyp/test/no-cpp/src/f.cc | 3 +++ third_party/python/gyp/test/no-cpp/src/test.gyp | 25 ++++++++++++++++++++++ 4 files changed, 31 insertions(+) create mode 100644 third_party/python/gyp/test/no-cpp/src/call-f-main.c create mode 100644 third_party/python/gyp/test/no-cpp/src/empty-main.c create mode 100644 third_party/python/gyp/test/no-cpp/src/f.cc create mode 100644 third_party/python/gyp/test/no-cpp/src/test.gyp (limited to 'third_party/python/gyp/test/no-cpp/src') diff --git a/third_party/python/gyp/test/no-cpp/src/call-f-main.c b/third_party/python/gyp/test/no-cpp/src/call-f-main.c new file mode 100644 index 0000000000..8b95c5910e --- /dev/null +++ b/third_party/python/gyp/test/no-cpp/src/call-f-main.c @@ -0,0 +1,2 @@ +void* f(); +int main() { f(); } diff --git a/third_party/python/gyp/test/no-cpp/src/empty-main.c b/third_party/python/gyp/test/no-cpp/src/empty-main.c new file mode 100644 index 0000000000..237c8ce181 --- /dev/null +++ b/third_party/python/gyp/test/no-cpp/src/empty-main.c @@ -0,0 +1 @@ +int main() {} diff --git a/third_party/python/gyp/test/no-cpp/src/f.cc b/third_party/python/gyp/test/no-cpp/src/f.cc new file mode 100644 index 0000000000..02f50f21a0 --- /dev/null +++ b/third_party/python/gyp/test/no-cpp/src/f.cc @@ -0,0 +1,3 @@ +extern "C" { void* f(); } + +void* f() { return new int; } diff --git a/third_party/python/gyp/test/no-cpp/src/test.gyp b/third_party/python/gyp/test/no-cpp/src/test.gyp new file mode 100644 index 0000000000..417015ec80 --- /dev/null +++ b/third_party/python/gyp/test/no-cpp/src/test.gyp @@ -0,0 +1,25 @@ +# 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' ], + }, + ], +} -- cgit v1.2.3