Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

clang-cl support. #65

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

clang-cl support. #65

wants to merge 1 commit into from

Conversation

API92
Copy link

@API92 API92 commented May 19, 2024

Tested with clang-cl.exe on amd64 and x86.

@darealshinji
Copy link

This part at the bottom:

#if defined(INCBIN_MSCL)
#  define INCTXT(NAME, FILENAME) \
     INCBIN_EXTERN(NAME)

Should be changed to this:

#if defined(INCBIN_MSCL)
#  define INCTXT(NAME, FILENAME) \
     INCBIN_EXTERN_2(char, NAME)

So that INCTXT() will always create const char * declarations.

@darealshinji
Copy link

darealshinji commented Jul 12, 2024

I also think that INCBIN_ALIGN should be empty on original cl.exe because no assembler is used there and the compiler and linker will chose the right value?

#ifdef INCBIN_MSCL
#  define INCBIN_ALIGN /* __declspec(align(INCBIN_ALIGNMENT)) */
#else
#  define INCBIN_ALIGN __attribute__((aligned(INCBIN_ALIGNMENT)))
#endif

@API92
Copy link
Author

API92 commented Jul 12, 2024

@darealshinji I think all changes for cl.exe should be in another PR. This PR doesn't change behavior for cl.exe but only for clang-cl.exe.

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