Skip to content

Conversation

@jmmartinez
Copy link

Fixes error when compiling with -DBUILD_SHARED_LIBS=ON:

  /usr/bin/ld:
  tools/comgr/CMakeFiles/amd_comgr.dir/src/comgr-compiler.cpp.o: in
  function
  `COMGR::AMDGPUCompiler::executeInProcessDriver(llvm::ArrayRef<char
  const*>)':
  amd/comgr/src/comgr-compiler.cpp:739:
  undefined reference to `clang::getDriverOptTable()'
  collect2: error: ld returned 1 exit status
  ninja: build stopped: subcommand failed.

Related to llvm#167374

Fixes error:

  /usr/bin/ld:
  tools/comgr/CMakeFiles/amd_comgr.dir/src/comgr-compiler.cpp.o: in
  function
  `COMGR::AMDGPUCompiler::executeInProcessDriver(llvm::ArrayRef<char
  const*>)':
  amd/comgr/src/comgr-compiler.cpp:739:
  undefined reference to `clang::getDriverOptTable()'
  collect2: error: ld returned 1 exit status
  ninja: build stopped: subcommand failed.
@jmmartinez jmmartinez self-assigned this Nov 19, 2025
@jmmartinez jmmartinez requested a review from lamb-j as a code owner November 19, 2025 14:32
@z1-cciauto
Copy link
Collaborator

@jmmartinez jmmartinez changed the title [Comgr] Add missing clangOptions [Comgr] Add missing clangOptions to Comgr link libraries Nov 19, 2025
Copy link
Collaborator

@lamb-j lamb-j left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for catching this. We should try to make sure this patch makes it into the next promotion to TheRock, as I believe they're using -DBUILD_SHARED_LIBS=ON

@jmmartinez
Copy link
Author

Thanks for catching this. We should try to make sure this patch makes it into the next promotion to TheRock, as I believe they're using -DBUILD_SHARED_LIBS=ON

Do you know how do we do that ? (e.g. is there a CP list)

@lamb-j
Copy link
Collaborator

lamb-j commented Nov 19, 2025

Good question. Right now TheRock hashes are coming from our amd-mainline branch, so saftest bet would be to CP this one to mainline. Will this break anything if we don't also pull in llvm#167374?

@jmmartinez
Copy link
Author

Good question. Right now TheRock hashes are coming from our amd-mainline branch, so saftest bet would be to CP this one to mainline. Will this break anything if we don't also pull in llvm#167374?

Yes, it'd be broken since clangOptions doesn't exist before that PR.

@jmmartinez jmmartinez merged commit 09a4d41 into amd-staging Nov 20, 2025
6 checks passed
@jmmartinez jmmartinez deleted the users/jmmartinez/fix/comgr_missing_lib branch November 20, 2025 08:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants