[NewOffloadModel] Pass link-time options through device-compiler and device-linker argument for ClangLinkerWrapper
In another patch https://github.com/intel/llvm/pull/19579, compilation and linking options used in ClangLinkerWrapper are changed to be consumed from the SYCLImage, instead of sycl_backend_compile_options_EQ and sycl_target_link_options_EQ that are passed as argument to the ClangLinkerWrapper. Because option in SYCLImage are options passed at compiler-time, we want to support for link-time options by passing them through device-compiler and device-linker argument for ClangLinkerWrapper. The specific changes are listed below.
- Remove
gpu_tool_arg_EQandcpu_tool_arg_EQoptions specification inLinkerWrapperOpts.td. We are now passing the link time backend compile option throughOPT_device_compiler_args_EQto ClangLinkerWrapper, as coded inClang.cpp. We are also passing link time linker option throughOPT_device_linker_args_EQto ClangLinkerWrapper - In
ClangLinkerWrapper.cpp, the options inOPT_device_compiler_args_EQandOPT_device_linker_args_EQare added and handled together with other compiler and linker options passed throughSYCLImage. - Modify the tests that are associated with these changes, such as those that are checking the compiler backend option and linker option passed into ClangLinkerWrapper.
With this patch, the following SYCL E2E tests pass with the new offloading model:
- KernelAndProgram/kernel-bundle-merge-options-env.cpp
- KernelAndProgram/level-zero-link-flags.cpp
- ESIMD/private_memory/pm_access_1.cpp
- ESIMD/private_memory/pm_access_2.cpp
- ESIMD/private_memory/pm_access_3.cpp
5 SYCL E2E tests passed (test names are listed in the PR description, and 3 pm_access_n test were only failing in Self Build CI before), and no SYCL E2E test or driver test regression occurred when the new offloading model was enabled as default together with my changes (the CI before removing new offloading changes from this PR can be found at https://github.com/intel/llvm/actions/runs/19864471834/job/56923211306?pr=20691)