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
"links" test with file argument should use the appropriate compiler for the source file #7703
Comments
This is theoretically backwards-incompatible, but it should be treated as a bugfix in my opinion. There's no way in Meson to compile a Another possibility is to add a |
bonzini
added a commit
to bonzini/meson
that referenced
this issue
Jul 22, 2021
Allow using the links method to test that the C++ driver (e.g. g++) can be used to link C objects. One usecase is that the C compiler's libsanitizer might not be compatible with the one included by the C++ driver. This is theoretically backwards-incompatible, but it should be treated as a bugfix in my opinion. There is no way in Meson to compile a .c file with the C++ driver as part of a build target, therefore there would be no reason to do something like meson.get_compiler(meson.get_compiler('cpp').links(files('main.c')). Fixes: mesonbuild#7703
bonzini
added a commit
to bonzini/meson
that referenced
this issue
Jul 22, 2021
Allow using the links method to test that the C++ driver (e.g. g++) can be used to link C objects. One usecase is that the C compiler's libsanitizer might not be compatible with the one included by the C++ driver. This is theoretically backwards-incompatible, but it should be treated as a bugfix in my opinion. There is no way in Meson to compile a .c file with the C++ driver as part of a build target, therefore there would be no reason to do something like meson.get_compiler(meson.get_compiler('cpp').links(files('main.c')). Fixes: mesonbuild#7703
bonzini
added a commit
to bonzini/meson
that referenced
this issue
Jul 22, 2021
Allow using the links method to test that the C++ driver (e.g. g++) can be used to link C objects. One usecase is that the C compiler's libsanitizer might not be compatible with the one included by the C++ driver. This is theoretically backwards-incompatible, but it should be treated as a bugfix in my opinion. There is no way in Meson to compile a .c file with the C++ driver as part of a build target, therefore there would be no reason to do something like meson.get_compiler(meson.get_compiler('cpp').links(files('main.c')). Fixes: mesonbuild#7703
bonzini
added a commit
to bonzini/meson
that referenced
this issue
Sep 7, 2021
Allow using the links method to test that the C++ driver (e.g. g++) can be used to link C objects. One usecase is that the C compiler's libsanitizer might not be compatible with the one included by the C++ driver. This is theoretically backwards-incompatible, but it should be treated as a bugfix in my opinion. There is no way in Meson to compile a .c file with the C++ driver as part of a build target, therefore there would be no reason to do something like meson.get_compiler(meson.get_compiler('cpp').links(files('main.c')). Fixes: mesonbuild#7703
bonzini
added a commit
to bonzini/meson
that referenced
this issue
Sep 7, 2021
Allow using the links method to test that the C++ driver (e.g. g++) can be used to link C objects. One usecase is that the C compiler's libsanitizer might not be compatible with the one included by the C++ driver. This is theoretically backwards-incompatible, but it should be treated as a bugfix in my opinion. There is no way in Meson to compile a .c file with the C++ driver as part of a build target, therefore there would be no reason to do something like meson.get_compiler(meson.get_compiler('cpp').links(files('main.c')). Fixes: mesonbuild#7703
trhd
pushed a commit
to trhd/meson
that referenced
this issue
Sep 29, 2021
Allow using the links method to test that the C++ driver (e.g. g++) can be used to link C objects. One usecase is that the C compiler's libsanitizer might not be compatible with the one included by the C++ driver. This is theoretically backwards-incompatible, but it should be treated as a bugfix in my opinion. There is no way in Meson to compile a .c file with the C++ driver as part of a build target, therefore there would be no reason to do something like meson.get_compiler(meson.get_compiler('cpp').links(files('main.c')). Fixes: mesonbuild#7703
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
I would like to test that the C++ driver (e.g.
g++
) can be used to link C objects. One usecase is that the C compiler's libsanitizer might not be compatible with the one included by the C++ driver..However, something like
meson.get_compiler('cpp').links(files('main.c'))
results in the following log:instead of for example:
To Reproduce
int main() {}
The text was updated successfully, but these errors were encountered: