-
Notifications
You must be signed in to change notification settings - Fork 34
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
Unsound bitcode collection when a single file is compiled multiple times #58
Comments
To be more precise: GLLVM actually produces two tuples, but clobbers the first (the |
I wonder if we can please all of the build systems all of the time. If the output was called |
I'm not 100% sure -- I think the confusion happens with the source files, since GLLVM special-cases the "single" compilation mode and will clobber |
Yeah you are right. |
GLLVM doesn't currently distinguish between multiple compilations of the same input file in a single build. For example, imagine the following:
When
make all
is run,foo.c
is compiled twice: once with-DPATCHED=1
and once without.GLLVM however only produces only one
.foo.c.{o,bc}
tuple, meaning that theget-bc
-collected bitcode for bothfoo.exe
andfoo.patched.exe
is the same (whichever targetmake
ran last).I think the solution here is to rewrite GLLVM's object and bitcode file emission to use content-addressed filenames, rather than path-computed filenames.
The text was updated successfully, but these errors were encountered: