Skip to content

Do not run cppinterop-tblgen by target name when cross-compiling - #1190

Open
chrisburr wants to merge 1 commit into
compiler-research:mainfrom
chrisburr:cross-tblgen
Open

chrisburr wants to merge 1 commit into
compiler-research:mainfrom
chrisburr:cross-tblgen

Conversation

@chrisburr

Copy link
Copy Markdown

Description

Currently cross-compiled builds need a native cppinterop-tblgen passed as CPPINTEROP_TABLEGEN_EXE. For Emscripten there is an error asking for it, but other cross builds fail with cppinterop-tblgen: command not found.

This PR treats CPPINTEROP_TABLEGEN_EXE as a provided binary only when it is not a target, so that cross-compiling without it stops at configure time with the intended error.

Found while cross-compiling ROOT 6.42 for linux-ppc64le on conda-forge.

Type of change

  • Bug fix
  • New feature
  • Requires documentation updates

Testing

Configured standalone against LLVM/Clang 22.1.8: native builds generate the same commands as before; cross-compiling without CPPINTEROP_TABLEGEN_EXE now stops at configure time with the error above; with -DCPPINTEROP_TABLEGEN_EXE=<path> the given binary is used.

Checklist

  • I have read the contribution guide recently

@mcbarton mcbarton left a comment •

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

See comment.

Comment on lines +155 to +157
message(FATAL_ERROR
"Cannot generate .inc files: set CPPINTEROP_TABLEGEN_EXE to a native "
"cppinterop-tblgen binary when cross-compiling.")

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

The need for a native tblgen executable is wrong in the case of Emscripten, where we do the cross compilation to wasm. This is proved in this PR #1187 where I build the tblgen executable using Emscripten, and run it under node.

@codecov

codecov Bot commented Nov 30, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 88.86%. Comparing base (3ab124a) to head (779291e).

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #1190   +/-   ##
=======================================
  Coverage   88.86%   88.86%           
=======================================
  Files          24       24           
  Lines        7014     7014           
=======================================
  Hits         6233     6233           
  Misses        781      781           
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

This branch has not been deployed

No deployments
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.

2 participants