-
-
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
osx
flag
#14238
Comments
Looking at git blame, this dates from #3439 that added support for LLVM 3.9. It was meant to keep DWARF v2 on macOS for some reason. I was probably following Rust (hence the wrong flag), but it was never limited in practice, so I guess it's safe to drop. Looking at Rust, they're now using DWARF v4 by default but Android, DragonflyBSD, FreeBSD, NetBSD (v2) and AIX (v3). I found a reference to clang that says macOS 10.11 and iOS9 started supporting v4 (older versions v2 only). Searching for So we can drop both flags. |
It might be interesting to eventually introduce a per target variable + maybe a compilation variable. |
What do you mean by "a per target variable" ? |
Hum, something we don't have in Crystal: a centralized definition per target triple. For example having a Each of clang and rust have a |
While making sure all flags are properly documented (crystal-lang/crystal-book#734), I found a dubious
osx
compiler flag used in debug codegen:crystal/src/compiler/crystal/codegen/debug.cr
Line 50 in bb96c53
This flag is never implicitly set anywhere by the compiler. For MacOS we're using the flag
darwin
. So this can only work if-Dosx
is passed to the compiler explicitly via command line argument. This seems a bit odd.The flag was originally introduced in #3439. At that time the implicit OS flag was also
darwin
so it should've never had any implicit effect.I'm not sure if the odd naming is intentional, but probably not?
Either way, I don't think it's used anywhere, so it might be fine to remove it?
If still necessary for something, as an explicit flag it should have a more descriptive name.
@ysbaddaden Do you have any recollection on this?
The text was updated successfully, but these errors were encountered: