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

source/instruction.cpp and source/val/Instruction.cpp conflict in external build config #451

Closed
null77 opened this issue Oct 27, 2016 · 2 comments
Assignees

Comments

@null77
Copy link
Contributor

null77 commented Oct 27, 2016

On Windows, instruction and Instruction evaluate to the same filename, so the visual studio linker in my custom build outputs the warning:

1>D:\angle\build\Debug_x64\obj\spirv_tools\Instruction.obj : warning LNK4042: object specified more than once; extras ignored

This forces the latest compiled "instruction" file to be linked, which can produce link errors.

My solution is to rename one or both of the files, but I wasn't sure on the preferred naming scheme. Can someone fix this, or tell me what a good preferred name is? Would be much appreciated, I know it doesn't affect all configs, but would make my life easier.

@dneto0
Copy link
Collaborator

dneto0 commented Oct 28, 2016

Ouch. There's a similar warning on my OSX build, but I've never seen a functional problem. We should fix this.

I just took a look. source/instruction.cpp is fairly trivial. We can get rid of it by moving its single-line function body into the header with explicit inlining.

Thanks for raising this issue.

@dneto0 dneto0 self-assigned this Oct 28, 2016
dneto0 added a commit to dneto0/SPIRV-Tools that referenced this issue Oct 28, 2016
Avoids linker problems on Windows and OSX with duplicate object file
names.  Avoids collision with source/opt/instruction.cpp

Fixes KhronosGroup#451
dneto0 added a commit to dneto0/SPIRV-Tools that referenced this issue Oct 28, 2016
Avoids linker problems on Windows and OSX with duplicate object file
names.  Avoids collision with source/val/instruction.cpp

Fixes KhronosGroup#451
dneto0 added a commit to dneto0/SPIRV-Tools that referenced this issue Nov 3, 2016
Avoids linker problems on Windows and OSX with duplicate object file
names.  Avoids collision with source/val/instruction.cpp

Fixes KhronosGroup#451
dneto0 added a commit to dneto0/SPIRV-Tools that referenced this issue Nov 3, 2016
Avoids linker problems on Windows and OSX with duplicate object file
names.  Avoids collision with source/val/instruction.cpp

Fixes KhronosGroup#451
@null77
Copy link
Contributor Author

null77 commented Nov 7, 2016

Thanks a lot for fixing this David!

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

No branches or pull requests

2 participants