diff options
Diffstat (limited to 'cmake/config.tests/static_link_order')
-rw-r--r-- | cmake/config.tests/static_link_order/CMakeLists.txt | 22 | ||||
-rw-r--r-- | cmake/config.tests/static_link_order/main.cpp | 33 | ||||
-rw-r--r-- | cmake/config.tests/static_link_order/objlib.cpp | 33 | ||||
-rw-r--r-- | cmake/config.tests/static_link_order/staticlib1.cpp | 33 | ||||
-rw-r--r-- | cmake/config.tests/static_link_order/staticlib2.cpp | 30 |
5 files changed, 0 insertions, 151 deletions
diff --git a/cmake/config.tests/static_link_order/CMakeLists.txt b/cmake/config.tests/static_link_order/CMakeLists.txt deleted file mode 100644 index 36ce10e87c..0000000000 --- a/cmake/config.tests/static_link_order/CMakeLists.txt +++ /dev/null @@ -1,22 +0,0 @@ -# The test represents the order-related issue that we have with the ld linker. -# -# CMake versions < 3.21.0 produce the following linker line: -# <binary_name> main.cpp -o static_link_order_test libstaticLib.a objlib.cpp.o -# Since 'static_link_order_test' doesn't have direct use of 'staticlib2.cpp.o' symbols -# the translation unit is not linked. When we link objlib.cpp.o it cannot resolve symbols from -# staticlib2.cpp.o. -# -# For now it's only applicable for ld-like linkers. 'lld' has no such issue. -cmake_minimum_required(VERSION 3.14) - -project(static_link_order_test LANGUAGES CXX) - -add_library(objLib OBJECT objlib.cpp) -add_library(staticLib STATIC staticlib1.cpp staticlib2.cpp) - -target_link_libraries(staticLib - INTERFACE objLib "$<TARGET_OBJECTS:objLib>" -) - -add_executable(static_link_order_test main.cpp) -target_link_libraries(static_link_order_test PRIVATE staticLib) diff --git a/cmake/config.tests/static_link_order/main.cpp b/cmake/config.tests/static_link_order/main.cpp deleted file mode 100644 index 02f10d1620..0000000000 --- a/cmake/config.tests/static_link_order/main.cpp +++ /dev/null @@ -1,33 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2021 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the utils of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:GPL-EXCEPT$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3 as published by the Free Software -** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -void staticLibFunc1(); - -int main() { - staticLibFunc1(); -} diff --git a/cmake/config.tests/static_link_order/objlib.cpp b/cmake/config.tests/static_link_order/objlib.cpp deleted file mode 100644 index c3889e04d7..0000000000 --- a/cmake/config.tests/static_link_order/objlib.cpp +++ /dev/null @@ -1,33 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2021 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the utils of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:GPL-EXCEPT$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3 as published by the Free Software -** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -void staticLibFunc2(); - -void objLibFunc() { - staticLibFunc2(); -} diff --git a/cmake/config.tests/static_link_order/staticlib1.cpp b/cmake/config.tests/static_link_order/staticlib1.cpp deleted file mode 100644 index b2e933e510..0000000000 --- a/cmake/config.tests/static_link_order/staticlib1.cpp +++ /dev/null @@ -1,33 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2021 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the utils of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:GPL-EXCEPT$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3 as published by the Free Software -** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -void objLibFunc(); - -void staticLibFunc1() { - objLibFunc(); -} diff --git a/cmake/config.tests/static_link_order/staticlib2.cpp b/cmake/config.tests/static_link_order/staticlib2.cpp deleted file mode 100644 index 7e84289797..0000000000 --- a/cmake/config.tests/static_link_order/staticlib2.cpp +++ /dev/null @@ -1,30 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2021 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the utils of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:GPL-EXCEPT$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3 as published by the Free Software -** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -void staticLibFunc2() { -} |