With 848eba7, Ubuntu 24.04, PVC. Consider the following trivial example:
This project builds main-static application from main.cpp and lib.cpp in the following way:
main.cpp is regular C++ source and built with g++
lib.cpp is SYCL source and built with dpclang++ into liblib-static.a
main-static application is linked by g++
Review build-no-whole-archive.sh and build-whole-archive.sh scripts for the details.
main-static built without -Wl,--whole-archive will fail with:
$ ./main-static
main-static: /home/dvrogozh/git/intel-llvm/sycl/source/detail/program_manager/program_manager.cpp:1620: sycl::_V1::detail::DeviceKernelInfo& sycl::_V1::detail::ProgramManager::getDeviceKernelInfo(const sycl::_V1::detail::compile_time_kernel_info_v1::CompileTimeKernelInfoTy&): Assertion `It != m_DeviceKernelInfoMap.end()' failed.
Aborted (core dumped)
Can compiler be changed to not require -Wl,--whole-archive in this case? Note that NVidia nvcc does not require that in a similar scenario.
CC: @tahonermann, @sarnex
With 848eba7, Ubuntu 24.04, PVC. Consider the following trivial example:
This project builds
main-staticapplication frommain.cppandlib.cppin the following way:main.cppis regular C++ source and built withg++lib.cppis SYCL source and built withdpclang++intoliblib-static.amain-staticapplication is linked byg++Review
build-no-whole-archive.shandbuild-whole-archive.shscripts for the details.main-staticbuilt without-Wl,--whole-archivewill fail with:Can compiler be changed to not require
-Wl,--whole-archivein this case? Note that NVidianvccdoes not require that in a similar scenario.CC: @tahonermann, @sarnex