TL;DR: implementing 64-bit source location as an opt-in feature via a CMake option (CLANG_ENABLE_64_BIT_SOURCE_LOCATIONS)
The initial proposal to switch clang entirely to 64-bit SourceLocation raised concerns about performance overhead and maintenance burden during discussion. Based on community feedback, this revised RFC proposes a compromise: an opt-in feature that provides 64-bit support only for those who need it.
Proposal
I propose a new CMake option: CLANG_ENABLE_64_BIT_SOURCE_LOCATIONS:
- when
OFF(Default): clang will continue to be compiled with the 32-bitSourceLocation. This ensures zero impact on performance and memory usage for the majority of users. - when
ON: clang will be compiled with a 64-bitSourceLocation. This expands the address space, mitigating the exhaustion issue.
Support & Maintenance Plan
To ensure this option is sustainable without burdening the community, the following support plan is proposed:
- support tier: this option will be supported under LLVMâs Peripheral Support Tier.
- continuous Integration: we will setup a dedicated buildbot with this option enabled to prevent breakages and ensure the feature remains functional.
- responsibility: the primary responsibility for maintaining this configuration and fixing bugs specific to it will on the users of the feature.
Feedback and comments are welcome.