-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
link_depends does not work with files() #1172
Comments
Same for |
This is a bug. Generally, everything that accepts files as strings should also accept them as |
It seems that
@nirbheek, would you rather I open a new issue about it? Edit:It actually seems it was mentioned in #1141. |
That was merged a few days ago in #1257. |
For other people reading this bug report, you almost never need to use |
This is pretty ugly, because I don't know how to use a single definition for two purposes: - --version-script needs a path relative to the build root - link_depends needs a path relative to source root Also, link_depends does not accept files() output [mesonbuild/meson#1172], and I don't see a way to go from files() output to a string path that can be used to craft the -Wl arg. Ideally, a single files() result could be used in both places. I'm leaving this as a separate commit for now.
This is pretty ugly, because I don't know how to use a single definition for two purposes: - --version-script needs a path relative to the build root - link_depends needs a path relative to source root Also, link_depends does not accept files() output [mesonbuild/meson#1172], and I don't see a way to go from files() output to a string path that can be used to craft the -Wl arg. Ideally, a single files() result could be used in both places. I'm leaving this as a separate commit for now.
This is pretty ugly, because I don't know how to use a single definition for two purposes: - --version-script needs a path relative to the build root - link_depends needs a path relative to source root Also, link_depends does not accept files() output [mesonbuild/meson#1172], and I don't see a way to go from files() output to a string path that can be used to craft the -Wl arg. Ideally, a single files() result could be used in both places. I'm leaving this as a separate commit for now.
This is pretty ugly, because I don't know how to use a single definition for two purposes: - --version-script needs a path relative to the build root - link_depends needs a path relative to source root Also, link_depends does not accept files() output [mesonbuild/meson#1172], and I don't see a way to go from files() output to a string path that can be used to craft the -Wl arg. Ideally, a single files() result could be used in both places. I'm leaving this as a separate commit for now.
This is pretty ugly, because I don't know how to use a single definition for two purposes: - --version-script needs a path relative to the build root - link_depends needs a path relative to source root Also, link_depends does not accept files() output [mesonbuild/meson#1172], and I don't see a way to go from files() output to a string path that can be used to craft the -Wl arg. Ideally, a single files() result could be used in both places. I'm leaving this as a separate commit for now.
This is pretty ugly, because I don't know how to use a single definition for two purposes: - --version-script needs a path relative to the build root - link_depends needs a path relative to source root Also, link_depends does not accept files() output [mesonbuild/meson#1172], and I don't see a way to go from files() output to a string path that can be used to craft the -Wl arg. Ideally, a single files() result could be used in both places. I'm leaving this as a separate commit for now.
This is pretty ugly, because I don't know how to use a single definition for two purposes: - --version-script needs a path relative to the build root - link_depends needs a path relative to source root Also, link_depends does not accept files() output [mesonbuild/meson#1172], and I don't see a way to go from files() output to a string path that can be used to craft the -Wl arg. Ideally, a single files() result could be used in both places. I'm leaving this as a separate commit for now.
This is pretty ugly, because I don't know how to use a single definition for two purposes: - --version-script needs a path relative to the build root - link_depends needs a path relative to source root Also, link_depends does not accept files() output [mesonbuild/meson#1172], and I don't see a way to go from files() output to a string path that can be used to craft the -Wl arg. Ideally, a single files() result could be used in both places. I'm leaving this as a separate commit for now.
…mesonbuild#1172 Currently only strings can be passed to the link_depends argument of executable and *library, which solves many cases, but not every one. This patch allows generated sources and Files to be passed as well. On the implementation side, it uses a helper method to keep the more complex logic separated from the __init__ method.
This is pretty ugly, because I don't know how to use a single definition for two purposes: - --version-script needs a path relative to the build root - link_depends needs a path relative to source root Also, link_depends does not accept files() output [mesonbuild/meson#1172], and I don't see a way to go from files() output to a string path that can be used to craft the -Wl arg. Ideally, a single files() result could be used in both places. I'm leaving this as a separate commit for now.
This is pretty ugly, because I don't know how to use a single definition for two purposes: - --version-script needs a path relative to the build root - link_depends needs a path relative to source root Also, link_depends does not accept files() output [mesonbuild/meson#1172], and I don't see a way to go from files() output to a string path that can be used to craft the -Wl arg. Ideally, a single files() result could be used in both places. I'm leaving this as a separate commit for now.
…mesonbuild#1172 Currently only strings can be passed to the link_depends argument of executable and *library, which solves many cases, but not every one. This patch allows generated sources and Files to be passed as well. On the implementation side, it uses a helper method to keep the more complex logic separated from the __init__ method.
…mesonbuild#1172 Currently only strings can be passed to the link_depends argument of executable and *library, which solves many cases, but not every one. This patch allows generated sources and Files to be passed as well. On the implementation side, it uses a helper method to keep the more complex logic separated from the __init__ method. This also requires that Targets set their link_depends paths to be absolute if that is required, rather than the ninja backend doing it for them. This adds tests for the following cases: - Using a file in a subdir - Using a configure_file as an input - Using a custom_target as an input It does not support using a generator as an input, since currently that would require calling the generator twice, once for the -Wl argument, and once for the link_depends.
…mesonbuild#1172 Currently only strings can be passed to the link_depends argument of executable and *library, which solves many cases, but not every one. This patch allows generated sources and Files to be passed as well. On the implementation side, it uses a helper method to keep the more complex logic separated from the __init__ method. This also requires that Targets set their link_depends paths to be absolute if that is required, rather than the ninja backend doing it for them. This adds tests for the following cases: - Using a file in a subdir - Using a configure_file as an input - Using a custom_target as an input It does not support using a generator as an input, since currently that would require calling the generator twice, once for the -Wl argument, and once for the link_depends. Also updates the docs.
…mesonbuild#1172 Currently only strings can be passed to the link_depends argument of executable and *library, which solves many cases, but not every one. This patch allows generated sources and Files to be passed as well. On the implementation side, it uses a helper method to keep the more complex logic separated from the __init__ method. This also requires that Targets set their link_depends paths to be absolute if that is required, rather than the ninja backend doing it for them. This adds tests for the following cases: - Using a file in a subdir - Using a configure_file as an input - Using a custom_target as an input It does not support using a generator as an input, since currently that would require calling the generator twice, once for the -Wl argument, and once for the link_depends. Also updates the docs.
…mesonbuild#1172 Currently only strings can be passed to the link_depends argument of executable and *library, which solves many cases, but not every one. This patch allows generated sources and Files to be passed as well. On the implementation side, it uses a helper method to keep the more complex logic separated from the __init__ method. This also requires that Targets set their link_depends paths to be absolute if that is required, rather than the ninja backend doing it for them. This adds tests for the following cases: - Using a file in a subdir - Using a configure_file as an input - Using a custom_target as an input It does not support using a generator as an input, since currently that would require calling the generator twice, once for the -Wl argument, and once for the link_depends. Also updates the docs.
…mesonbuild#1172 Currently only strings can be passed to the link_depends argument of executable and *library, which solves many cases, but not every one. This patch allows generated sources and Files to be passed as well. On the implementation side, it uses a helper method to keep the more complex logic separated from the __init__ method. This also requires that Targets set their link_depends paths as Files, and the backend is responsible for converting to strings when it wants them. This adds tests for the following cases: - Using a file in a subdir - Using a configure_file as an input - Using a custom_target as an input It does not support using a generator as an input, since currently that would require calling the generator twice, once for the -Wl argument, and once for the link_depends. Also updates the docs.
…mesonbuild#1172 Currently only strings can be passed to the link_depends argument of executable and *library, which solves many cases, but not every one. This patch allows generated sources and Files to be passed as well. On the implementation side, it uses a helper method to keep the more complex logic separated from the __init__ method. This also requires that Targets set their link_depends paths as Files, and the backend is responsible for converting to strings when it wants them. This adds tests for the following cases: - Using a file in a subdir - Using a configure_file as an input - Using a custom_target as an input It does not support using a generator as an input, since currently that would require calling the generator twice, once for the -Wl argument, and once for the link_depends. Also updates the docs.
…mesonbuild#1172 Currently only strings can be passed to the link_depends argument of executable and *library, which solves many cases, but not every one. This patch allows generated sources and Files to be passed as well. On the implementation side, it uses a helper method to keep the more complex logic separated from the __init__ method. This also requires that Targets set their link_depends paths as Files, and the backend is responsible for converting to strings when it wants them. This adds tests for the following cases: - Using a file in a subdir - Using a configure_file as an input - Using a custom_target as an input It does not support using a generator as an input, since currently that would require calling the generator twice, once for the -Wl argument, and once for the link_depends. Also updates the docs.
…mesonbuild#1172 Currently only strings can be passed to the link_depends argument of executable and *library, which solves many cases, but not every one. This patch allows generated sources and Files to be passed as well. On the implementation side, it uses a helper method to keep the more complex logic separated from the __init__ method. This also requires that Targets set their link_depends paths as Files, and the backend is responsible for converting to strings when it wants them. This adds tests for the following cases: - Using a file in a subdir - Using a configure_file as an input - Using a custom_target as an input It does not support using a generator as an input, since currently that would require calling the generator twice, once for the -Wl argument, and once for the link_depends. Also updates the docs.
…mesonbuild#1172 Currently only strings can be passed to the link_depends argument of executable and *library, which solves many cases, but not every one. This patch allows generated sources and Files to be passed as well. On the implementation side, it uses a helper method to keep the more complex logic separated from the __init__ method. This also requires that Targets set their link_depends paths as Files, and the backend is responsible for converting to strings when it wants them. This adds tests for the following cases: - Using a file in a subdir - Using a configure_file as an input - Using a custom_target as an input It does not support using a generator as an input, since currently that would require calling the generator twice, once for the -Wl argument, and once for the link_depends. Also updates the docs.
Hey
The
link_depends:
argument to executables and libraries does not work withFile
objects so far. It requires strings. See this example:It fails with:
I circumvent this by using
join_paths(meson.current_source_dir(), 'my_file')
instead offiles()
, but I guess that's no the suggested solution?Furthermore, the reference-manual in the wiki does not explain the
File
object, but the documentation offiles()
mentions it.Thanks
David
The text was updated successfully, but these errors were encountered: