Add options to modify llvm-kompile's parameters in the Kompile frontend#2340
Merged
rv-jenkins merged 9 commits intomasterfrom Dec 1, 2021
Merged
Add options to modify llvm-kompile's parameters in the Kompile frontend#2340rv-jenkins merged 9 commits intomasterfrom
rv-jenkins merged 9 commits intomasterfrom
Conversation
dwightguth
previously requested changes
Nov 22, 2021
Contributor
dwightguth
left a comment
There was a problem hiding this comment.
This needs a bit of work.
dwightguth
suggested changes
Nov 22, 2021
Contributor
dwightguth
left a comment
There was a problem hiding this comment.
This needs a bit of work:
- First, we should call the flag something like
llvm-kompile-output-typeand it should take an enumeration with the following values: main, search, static, library. - You should call the second flag
llvm-kompile-outputand it should probably not have a short option version. It should override the default output path in all cases and it should be an error to use together with--enable-search. - We need better documentation of exactly what these flags do and what they are used for. That includes describing the intended use case of each of the 4 enumeration values I named above, and more detailed descriptions of both flags that don't assume knowledge of the internals of the backend.
In case you're unaware, here's a bit about each of the 4 values I mentioned above:
- main. Builds an interpreter and links in the main method. Generates an executable unless other flags are explicitly passed to llvm-kompile
- search. Same as main, except the executable does search instead of single-path execution.
- library. Same as main, except that it does not link in a main method. The user is expected to use it either by explicitly linking in their own main method.
- static. Same as library, except it does not pass any
-lflags to clang when doing linking. This is useful primarily if you are passing-r -nostdlibto llvm-kompile in order to perform partial linking and generate an object file that can be linked later on a machine that does not have K installed.
Contributor
Author
|
Contributor
|
Contributor
Author
|
@dwightguth re-requested your review. I want to mention that |
llvm-kompile ... library ... to Kompile frontend
dwightguth
approved these changes
Nov 30, 2021
Contributor
dwightguth
left a comment
There was a problem hiding this comment.
looks good but please update the help text as suggested before merging.
5 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
fixes: #2088
Usage:
kompile --backend llvm ... --llvm-kompile-type <main|search|library|static> --llvm-kompile-output <filename> ...This gives better access to llvm-kompile's parameters instead of going through
--no-llvm-kompile.