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

Support for gcc -wrapper option #1339

Open
comio opened this issue Oct 18, 2023 · 1 comment
Open

Support for gcc -wrapper option #1339

comio opened this issue Oct 18, 2023 · 1 comment
Labels
feature New or improved feature

Comments

@comio
Copy link

comio commented Oct 18, 2023

Dear All,

I'm trying to use ccache in my environment. I love this tool but I noticed that when I use the gcc --wrapper option the ccache recognizes it as "multiple source files" (with fallback to the compiler).

My command line is like:

ccache aarch64-linux-gnu-g++ -wrapper my-custom-wrapper.bin -no-integrated-cpp -g -ggdb -Wall -Wconversion -Wno-unused-variable -Wno-unused-parameter -Wfatal-errors -Werror -ffunction-sections -fdata-sections -O0 -Wno-implicit-fallthrough -std=c++17 -fPIC -MMD -Wno-shadow -g -fPIC -Wno-unused-but-set-variable -MD -MT file.cc.o -MF file.cc.o.d -o file.cc.o -c file.cc

Thanks a lot and have a nice day.

luigi

@comio comio added the feature New or improved feature label Oct 18, 2023
@comio comio changed the title Support for gcc --wrapper option Support for gcc -wrapper option Oct 20, 2023
@jrosdahl
Copy link
Member

Not sure if it's possible to support -wrapper in a reasonable way, but here are some notes for a potential implementation:

  • Need to handle -wrapper @file specially where the @file part does not get expanded like normal @file arguments do.
  • Need to split the argument to -wrapper on , to find the wrapper executable.
  • Probably should run hash_compiler on the wrapper executable. This should be enough for things like running strace or gdb, but is it enough for wrappers that modify the outcome?

Meanwhile I'll mark -wrapper as "too hard" so that the result will be "unsupported compiler option" instead of "multiple source files".

jrosdahl added a commit that referenced this issue Oct 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New or improved feature
Projects
None yet
Development

No branches or pull requests

2 participants