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

Custom Compiler location #58

Merged
merged 3 commits into from
Jan 27, 2015

Conversation

kaarrot
Copy link

@kaarrot kaarrot commented Jan 23, 2015

I split this PR into two separate commits:
The earlier one adds support for custom compiler location by:

  • creating a new struct (CompilerOptions - see CompileOptions.h ) which holds compiler specific content stored under ProjectSettings struct. This duplicates partially the content of ProjectSettings but limits amount of changes and simplifies arguments passed to other function.

I also performed some cleanup and added the linkLibraryList vector to CompilerOptions.

Second commit adds some logging capabilities and saves the runtime compiler options into a text file in /tmp. I found this quite handy when testing if the paths and flags are correctly formatted.

Please feel free to remove, modify whatever you find necessary.

Kuba

@dougbinks
Copy link
Collaborator

This looks good - I'll need to make the changes for the Windows compiler to support the new interface, and run some tests so may take a bit to merge this (I hope to get time today, but it might be later on), but many thanks in advance!

@dougbinks dougbinks self-assigned this Jan 25, 2015
@dougbinks
Copy link
Collaborator

I've made the changes needed for Windows, along with some re-arrangements and they're in this branch https://github.com/RuntimeCompiledCPlusPlus/RuntimeCompiledCPlusPlus/tree/custom-compiler-location .

If you get the time it would be great if you could check over this, otherwise I'll run a few more tests early next week and then merge the branch into main. Many thanks!

@kaarrot
Copy link
Author

kaarrot commented Jan 26, 2015

Tested this morning - and all works correct for me.
At this point I think the only question I have is regarding the linkLibraryList. What was the reson to extract it from the CompilerOptions struct back to the standalone vector form?
The idea was to keep it at the same place the rest compiler specific content but perhaps I missed something.
Otherwise all looks good.

Thanks,
kuba

@dougbinks
Copy link
Collaborator

The reason I moved this out of the CompilerOptions structure is that the linkLibraryList is generated on the fly for each compile, depending on what files are being compiled, whereas the CompilerOptions structure was best factored as containing those options for each project which are constant.

It's possible to put all of the parameters passed to the function wrapped up in one structure, but this seemed too much effort for little benefit.

@dougbinks dougbinks merged commit 0d08a51 into RuntimeCompiledCPlusPlus:master Jan 27, 2015
@dougbinks
Copy link
Collaborator

Now merged. I made a final addition to select the default compiler by detecting the compiler used, and simplified the compiler string as the standard options worked well on OSX as well as Linux.

@dougbinks
Copy link
Collaborator

And many thanks for this kubaroth!

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.

None yet

2 participants