mirror of
https://github.com/pybind/pybind11.git
synced 2026-03-14 20:27:47 +00:00
fix: expose required symbol using clang (#5700)
* test: Added test case for visibility of common symbols across shared libraries * style: pre-commit fixes * tests: cmake target name fix * tests: Added visibility test to ci * tests: set the default visibility to hidden * prototype/proof-of-concept fix: PYBIND11_EXPORT_GUARDED_DELETE * Fix silly oversight: actually use PYBIND11_EXPORT_GUARDED_DELETE * Update struct_smart_holder.h * style: pre-commit fixes * Update include/pybind11/detail/struct_smart_holder.h * Update struct_smart_holder.h * ci: fix addition to reusable-standard.yml * Update CMakeLists.txt * refactor: rename tests to test_cross_module_rtti Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com> --------- Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Henry Schreiner <HenrySchreinerIII@gmail.com> Co-authored-by: Ralf W. Grosse-Kunstleve <rgrossekunst@nvidia.com>
This commit is contained in:
43
.github/workflows/ci.yml
vendored
43
.github/workflows/ci.yml
vendored
@@ -230,6 +230,9 @@ jobs:
|
||||
- name: Interface test
|
||||
run: cmake --build . --target test_cmake_build
|
||||
|
||||
- name: Visibility test
|
||||
run: cmake --build . --target test_cross_module_rtti
|
||||
|
||||
|
||||
manylinux:
|
||||
name: Manylinux on 🐍 3.13t • GIL
|
||||
@@ -328,6 +331,9 @@ jobs:
|
||||
- name: C++ tests
|
||||
run: cmake --build --preset default --target cpptest
|
||||
|
||||
- name: Visibility test
|
||||
run: cmake --build --preset default --target test_cross_module_rtti
|
||||
|
||||
- name: Run Valgrind on Python tests
|
||||
if: matrix.valgrind
|
||||
run: cmake --build --preset default --target memcheck
|
||||
@@ -386,6 +392,8 @@ jobs:
|
||||
- name: Interface test
|
||||
run: cmake --build build --target test_cmake_build
|
||||
|
||||
- name: Visibility test
|
||||
run: cmake --build build --target test_cross_module_rtti
|
||||
|
||||
# Testing NVCC; forces sources to behave like .cu files
|
||||
cuda:
|
||||
@@ -505,6 +513,8 @@ jobs:
|
||||
- name: Interface test
|
||||
run: cmake --build build --target test_cmake_build
|
||||
|
||||
- name: Visibility test
|
||||
run: cmake --build build --target test_cross_module_rtti
|
||||
|
||||
# Testing on GCC using the GCC docker images (only recent images supported)
|
||||
gcc:
|
||||
@@ -556,6 +566,9 @@ jobs:
|
||||
- name: Interface test
|
||||
run: cmake --build build --target test_cmake_build
|
||||
|
||||
- name: Visibility test
|
||||
run: cmake --build build --target test_cross_module_rtti
|
||||
|
||||
- name: Configure - Exercise cmake -DPYBIND11_TEST_OVERRIDE
|
||||
if: matrix.gcc == '12'
|
||||
shell: bash
|
||||
@@ -638,6 +651,11 @@ jobs:
|
||||
set +e; source /opt/intel/oneapi/setvars.sh; set -e
|
||||
cmake --build build-11 --target test_cmake_build
|
||||
|
||||
- name: Visibility test
|
||||
run: |
|
||||
set +e; source /opt/intel/oneapi/setvars.sh; set -e
|
||||
cmake --build build-11 --target test_cross_module_rtti
|
||||
|
||||
- name: Configure C++17
|
||||
run: |
|
||||
set +e; source /opt/intel/oneapi/setvars.sh; set -e
|
||||
@@ -670,6 +688,10 @@ jobs:
|
||||
set +e; source /opt/intel/oneapi/setvars.sh; set -e
|
||||
cmake --build build-17 --target test_cmake_build
|
||||
|
||||
- name: Visibility test
|
||||
run: |
|
||||
set +e; source /opt/intel/oneapi/setvars.sh; set -e
|
||||
cmake --build build-17 --target test_cross_module_rtti
|
||||
|
||||
# Testing on CentOS (manylinux uses a centos base).
|
||||
centos:
|
||||
@@ -732,6 +754,9 @@ jobs:
|
||||
- name: Interface test
|
||||
run: cmake --build build --target test_cmake_build
|
||||
|
||||
- name: Visibility test
|
||||
run: cmake --build build --target test_cross_module_rtti
|
||||
|
||||
|
||||
# This tests an "install" with the CMake tools
|
||||
install-classic:
|
||||
@@ -961,6 +986,9 @@ jobs:
|
||||
- name: Interface test C++20
|
||||
run: cmake --build build --target test_cmake_build
|
||||
|
||||
- name: Visibility test
|
||||
run: cmake --build build --target test_cross_module_rtti
|
||||
|
||||
- name: Configure C++20 - Exercise cmake -DPYBIND11_TEST_OVERRIDE
|
||||
run: >
|
||||
cmake -S . -B build_partial
|
||||
@@ -1034,6 +1062,9 @@ jobs:
|
||||
- name: Interface test C++11
|
||||
run: PYTHONHOME=/${{matrix.sys}} PYTHONPATH=/${{matrix.sys}} cmake --build build --target test_cmake_build
|
||||
|
||||
- name: Visibility test
|
||||
run: PYTHONHOME=/${{matrix.sys}} PYTHONPATH=/${{matrix.sys}} cmake --build build --target test_cross_module_rtti
|
||||
|
||||
- name: Clean directory
|
||||
run: git clean -fdx
|
||||
|
||||
@@ -1055,6 +1086,9 @@ jobs:
|
||||
- name: Interface test C++14
|
||||
run: PYTHONHOME=/${{matrix.sys}} PYTHONPATH=/${{matrix.sys}} cmake --build build2 --target test_cmake_build
|
||||
|
||||
- name: Visibility test
|
||||
run: PYTHONHOME=/${{matrix.sys}} PYTHONPATH=/${{matrix.sys}} cmake --build build2 --target test_cross_module_rtti
|
||||
|
||||
- name: Clean directory
|
||||
run: git clean -fdx
|
||||
|
||||
@@ -1076,6 +1110,9 @@ jobs:
|
||||
- name: Interface test C++17
|
||||
run: PYTHONHOME=/${{matrix.sys}} PYTHONPATH=/${{matrix.sys}} cmake --build build3 --target test_cmake_build
|
||||
|
||||
- name: Visibility test
|
||||
run: PYTHONHOME=/${{matrix.sys}} PYTHONPATH=/${{matrix.sys}} cmake --build build3 --target test_cross_module_rtti
|
||||
|
||||
windows_clang:
|
||||
if: github.event.pull_request.draft == false
|
||||
|
||||
@@ -1143,6 +1180,9 @@ jobs:
|
||||
- name: Interface test
|
||||
run: cmake --build . --target test_cmake_build -j 2
|
||||
|
||||
- name: Visibility test
|
||||
run: cmake --build . --target test_cross_module_rtti -j 2
|
||||
|
||||
- name: Clean directory
|
||||
run: git clean -fdx
|
||||
|
||||
@@ -1210,6 +1250,9 @@ jobs:
|
||||
- name: Interface test
|
||||
run: cmake --build . --target test_cmake_build -j 2
|
||||
|
||||
- name: Visibility test
|
||||
run: cmake --build . --target test_cross_module_rtti -j 2
|
||||
|
||||
- name: CMake Configure - Exercise cmake -DPYBIND11_TEST_OVERRIDE
|
||||
run: >
|
||||
cmake -S . -B build_partial
|
||||
|
||||
Reference in New Issue
Block a user