-
Notifications
You must be signed in to change notification settings - Fork 13
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
llc only supports one input file #36
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you add a minimal example that reproduces the issue? You can add it as example04
in the top-level directory.
I plan to write some basic tests and move the examples to form a small test suite.
COMMAND llc | ||
ARGS | ||
-filetype=obj | ||
-relocation-model=pic |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why do we need this flag here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added this flag because the compiler complained in my real project that I needed to recompile with -fPIC
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd rather not have project-specific options hardcoded like this.
This command handles other args and passes them unaltered using ${LLVMIR_ATTACH_UNPARSED_ARGUMENTS}
.
Can you please try your project with defining that flag in your CMakeLists.txt
?
@@ -753,14 +753,26 @@ function(llvmir_attach_obj_target) | |||
list(APPEND IN_FULL_LLVMIR_FILES "${IN_LLVMIR_DIR}/${IN_LLVMIR_FILE}") | |||
endforeach() | |||
|
|||
set(FULL_OUT_LLVMIR_FILE "${WORK_DIR}/${TRGT}.o") | |||
if(SHORT_NAME) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't SHORT_NAME
still useful for the multiple output files generated by the changes in your PR?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In my project it worked fine without it, so I assumed that I could just remove it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please reintroduce it and check that your project still works?
Just because it's not needed in your configuration doesn't mean that wasn't introduced for a reason initially.
COMMAND llc | ||
ARGS | ||
-filetype=obj | ||
-relocation-model=pic |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd rather not have project-specific options hardcoded like this.
This command handles other args and passes them unaltered using ${LLVMIR_ATTACH_UNPARSED_ARGUMENTS}
.
Can you please try your project with defining that flag in your CMakeLists.txt
?
@@ -753,14 +753,26 @@ function(llvmir_attach_obj_target) | |||
list(APPEND IN_FULL_LLVMIR_FILES "${IN_LLVMIR_DIR}/${IN_LLVMIR_FILE}") | |||
endforeach() | |||
|
|||
set(FULL_OUT_LLVMIR_FILE "${WORK_DIR}/${TRGT}.o") | |||
if(SHORT_NAME) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please reintroduce it and check that your project still works?
Just because it's not needed in your configuration doesn't mean that wasn't introduced for a reason initially.
When the target library is compiled to a static library with the following CMAKE options:
I got the following error message:
The problem is that LLC only supports one input file. This PR fixes this issue by going over each bc file separately.