-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Objects of files() may be ambiguous #1494
Comments
The fix for this is to use not the filename for deriving the object name, but the relative path to the current directory. The fix will have to also keep into account object extraction. |
@nirbheek Semi-related to this, perhaps extract_objects() should be able to receive files() as arguments? |
Yes, that makes sense too! |
Also, check a file with a subdirectory and extract_objects().
This prevents files with the same name from different directories from producing object files with the same name and breaking ninja. Fixes mesonbuild#1494.
This prevents files with the same name from different directories from producing object files with the same name and breaking ninja. Fixes mesonbuild#1494.
Also, check a file with a subdirectory and extract_objects().
This prevents files with the same name from different directories from producing object files with the same name and breaking ninja. Fixes mesonbuild#1494.
Also, check a file with a subdirectory and extract_objects().
This prevents files with the same name from different directories from producing object files with the same name and breaking ninja. Fixes mesonbuild#1494.
Is there a way to hack around this in earlier versions of meson? |
If you can't rename the files, you can hack around it by 'copying' the files into the build directory with copied_file = configure_file(input : 'source-file.c',
output : 'renamed-file.c',
configuration : configuration_data()) Then use the |
Also, check a file with a subdirectory and extract_objects().
This prevents files with the same name from different directories from producing object files with the same name and breaking ninja. Fixes mesonbuild#1494.
Also, check a file with a subdirectory and extract_objects().
When files are specified using files(), their subdirectories aren't added as a prefix to their object file names, and all are output to the same output directory. As a result, if two different subdirectories have files with the same name, a conflict will follow.
For example, the following fails with
Multiple producers for Ninja target "a.out@exe/file.c.o". Please rename your targets.
:The text was updated successfully, but these errors were encountered: