Skip to content

Conversation

aokblast
Copy link
Contributor

@aokblast aokblast commented Oct 4, 2025

The gnu-ld resolves archive files (static library in CMake) in order.
Therefore, we should disable CMP0179 so that CMake will generate the
correct order.

@llvmbot llvmbot added the cmake Build system in general and CMake in particular label Oct 4, 2025
@aokblast
Copy link
Contributor Author

aokblast commented Oct 4, 2025

For symbol not referenced when resolving an archive file, it fails in here.

The gnu-ld will optimize so that an object file in the archive does not have any referenced symbol won't be loaded.

The archive_symbol_lookup lookups the internal hash table (not gnu.hashtable) section to see if a symbol has appeared before. Therefore, if libLLVMTableGen is not put before libLLVMSupport, it fails to be found in the hash table.

@aokblast aokblast changed the title tblgen: fix dependency for gnu-ld [TableGen] fix dependency for gnu-ld Oct 4, 2025
The gnu-ld resolves archive files (static library) in order.
Therefore, we should disable CMP0179 so that CMake will generate the
correct order.
@aokblast aokblast changed the title [TableGen] fix dependency for gnu-ld [cmake] disable CMP0179 for gnu-ld Oct 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cmake Build system in general and CMake in particular

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants