-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
-dump-c-flags does not respect -o option #21824
Comments
It does have the right flags. V always stores temporary files in the VTMP folder. What
|
@spytheman Thank you very much for such a quick answer. I accept that the current behaviour accurately reflects the actions performed by V, and that altering the output could lead to a misinterpretation of the process, potentially causing other user issues. ... That said, it is still not what a user without an understanding of the V internals would expect to see. When I am surprised by this decision but accept that it would take time, perhaps best spent elsewhere. Thank you for clarifying your position. |
@thomas-mangin does clang or gcc have similar flags which respect -o ? |
Hello @medvednikov - Thank you for joining this thread. I thought it closed after my last post. I am sorry as I do not know the answer, nor do I understand why you asked the question. |
GitHub allows having a discussion in closed threads. If clang or gcc have this behavior (-o applying to not only binary path), then we should mimic it and implement this. Then this thread will be re-opened. |
Yes, we can continue this discussion. By closed, I thought the matter was closed :-) For your point about matching GCC, I do not know enough about either GCC without a thorough investigation to answer meaningfully. All I know is that:
I was surprised to see It may be that I was only wondering if If the file is moved after the code generation, then the compiler options point to a missing file and will not allow the user to modify the C file and compile using the settings as they are. It seems counterintuitive, but again, I am only giving my opinion as a user, nothing more. |
I'll investigate this and get back to you soon. |
Describe the bug
When using both
-dump-c-flags
and the-o
option, the file is well created in the current folder but thecompilation_flags.rsp
file reference what would have been the temporary location of the C file, not the one specified by-o
.Reproduction Steps
Expected Behavior
the generated compilation_flags.rsp has the right path for the file
Current Behavior
the file is generated in the tmp location
Possible Solution
No response
Additional Information/Context
No response
V version
V 0.4.6 4475759
Environment details (OS name and version, etc.)
V full version: V 0.4.6 cc14272.4475759
OS: macos, macOS, 14.5, 23F79
Processor: 10 cpus, 64bit, little endian, Apple M1 Max
getwd: /Users/thomas/Code/github.com/ze-community/ze/main
vexe: /Users/thomas/Unix/local/v/master/v
vexe mtime: 2024-07-06 14:05:43
vroot: OK, value: /Users/thomas/Unix/local/v/master
VMODULES: OK, value: /Users/thomas/Unix/data/v/modules
VTMP: OK, value: /tmp/v_501
Git version: git version 2.45.2
Git vroot status: weekly.2024.27-25-g4475759c (5 commit(s) behind V master)
.git/config present: true
CC version: Apple clang version 15.0.0 (clang-1500.3.9.4)
thirdparty/tcc status: thirdparty-macos-arm64 5c1d002f
Note
You can use the 👍 reaction to increase the issue's priority for developers.
Please note that only the 👍 reaction to the issue itself counts as a vote.
Other reactions and those to comments will not be taken into account.
The text was updated successfully, but these errors were encountered: