Skip to content

don't set clang target as its already handled in bindgen by default#16

Merged
robin-nitrokey merged 1 commit intotrussed-dev:mainfrom
liebman:dont-set-clang-target
Sep 18, 2024
Merged

don't set clang target as its already handled in bindgen by default#16
robin-nitrokey merged 1 commit intotrussed-dev:mainfrom
liebman:dont-set-clang-target

Conversation

@liebman
Copy link
Contributor

@liebman liebman commented Sep 13, 2024

There is no need to set the clang_target as its already being defaulted to TARGET. Besides passing the rust target is wrong for some targets as llvm's targets are slightly different (see this mapping) causing it to fail on some TARGETS with:

  error: unknown target triple 'riscv32imac-unknown-none-elf'
  thread 'main' panicked at /Users/chris.l/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bindgen-0.69.4/ir/context.rs:556:15:
  libclang error; possible causes include:
  - Invalid flag syntax
  - Unrecognized flags
  - Invalid flag arguments
  - File I/O errors
  - Host vs. target architecture mismatch
  If you encounter an error missing from this list, please file an issue or a PR!

@robin-nitrokey
Copy link
Member

Good catch, thank you! I’ve squashed the commits, added a changelog entry and will merge after adding some CI checks to the repository.

@robin-nitrokey robin-nitrokey merged commit aa64d08 into trussed-dev:main Sep 18, 2024
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

Comments