Skip to content

Flag to disable cling's NVPTX target #20208

@LukasBreitwieser

Description

@LukasBreitwieser

Explain what you would like to see improved and how.

In order to reduce binary size and compile time, @ktf asked for a way to disable the LLVM NVPTX build target.
Currently, NVPTX is added in all cases, even if ROOT is built with -Dcuda=off -Dcudnn=off:
see here:

if(NOT "${ROOT_CLING_TARGET}" STREQUAL "all")
  string(APPEND ROOT_CLING_TARGET ";NVPTX")
endif()

and a check here:

if( NOT "NVPTX" IN_LIST LLVM_TARGETS_TO_BUILD)
  message(FATAL_ERROR "NVPTX backend is not activated\n"
    "Please enable it via -DLLVM_TARGETS_TO_BUILD=\"host;NVPTX\"")
endif()

Commenting these lines leads to build errors related to the IncrementalCUDADeviceCompiler.

ROOT version

current master (e76402aad8)

Installation method

Build from sourc

Operating system

Ubuntu 24.04

Additional context

No response

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions