Fix issue 20297: ld: warning: building for macOS#10476
Fix issue 20297: ld: warning: building for macOS#10476jacob-carlborg wants to merge 2 commits intodlang:masterfrom
Conversation
|
Thanks for your pull request and interest in making D better, @jacob-carlborg! We are looking forward to reviewing it, and you should be hearing from a maintainer soon.
Please see CONTRIBUTING.md for more information. If you have addressed all reviews or aren't sure how to proceed, don't hesitate to ping us with a simple comment. Bugzilla references
Testing this PR locallyIf you don't have a local development environment setup, you can use Digger to test this PR: dub fetch digger
dub run digger -- build "master + dmd#10476" |
src/dmd/backend/mach.d
Outdated
| uint platform = PLATFORM_MACOS; | ||
| uint minos = 659200; // 10.15 | ||
| uint sdk = 659200; // 10.15 |
There was a problem hiding this comment.
These three attributes can be configured when compiling with Clang. Is this something we want to support? By default it will use the current platform and current SDK to set these values.
94029b8 to
47707dd
Compare
a9df814 to
e2901a7
Compare
e2901a7 to
1e8fff8
Compare
|
Not WIP anymore. |
b9eb995 to
797916e
Compare
|
Don't know why the tests are failing. They work locally. |
|
What version is the machine ? I doubt it's Catalina. |
|
One machine is running Darwin 13 and one is running Darwin 15. I think Catalina is at least on Darwin 19. One is running Clang 6 which is really old and the other one Clang 8 which is quite old. I developed this on Mojave so it’s not dependent on Catalina. Perhaps I can check the version and only add the new load command if it’s recent enough. |
Sounds like the way to go. |
|
Seems like the |
f385ebd to
3c99b30
Compare
|
Now handles both |
3c99b30 to
41f6d3f
Compare
c6a6df0 to
917de2d
Compare
|
I still don't know how to debug the segfault in the failing test since it doesn't happen locally. |
b289067 to
656f503
Compare
I had an old VM running a version of macOS where I could reproduce the failure. Hopefully it should be fixed now. |
656f503 to
38ca640
Compare
|
Anyone that understands what the |
|
It came from this PR: #8121 and seems to be making sure that dmd -run doesn't pollute the environment. I assume something in CoreFoundation is setting __CF_USER_TEXT_ENCODING=0x1F6:0:0 in the environment which I think is the only change in env that's causing that test to fail |
|
Needs a rebase |
|
The warnings don't appear anymore. Apple must have changed something. Not sure if it's still interesting to have these load commands. |
|
macOS 13 coverage tests on mainline have suddenly began failing with: Time for a rebase? |
…amic symbol table differ Encode macosx_version_min or build_version into the object file, originally authored by @jacob-carlborg in dlang#10476. This has been simplified to omit parsing the SDK version. Based on what I see GCC is doing (`-platform_version macos $version_min 0.0`), this information is not required in order for things to work. Co-authored-by: Jacob Carlborg <doob@me.com>
…amic symbol table differ Encode macosx_version_min or build_version into the object file, originally authored by @jacob-carlborg in dlang#10476. This has been simplified to omit parsing the SDK version. Based on what I see GCC is doing (`-platform_version macos $version_min 0.0`), this information is not required in order for things to work. Co-authored-by: Jacob Carlborg <doob@me.com>
…amic symbol table differ Encode macosx_version_min or build_version into the object file, originally authored by @jacob-carlborg in dlang#10476. This has been simplified to omit parsing the SDK version. Based on what I see GCC is doing (`-platform_version macos $version_min 0.0`), this information is not required in order for things to work. Co-authored-by: Jacob Carlborg <doob@me.com>
…amic symbol table differ Encode macosx_version_min or build_version into the object file, originally authored by @jacob-carlborg in dlang#10476. This has been simplified to omit parsing the SDK version. Based on what I see GCC is doing (`-platform_version macos $version_min 0.0`), this information is not required in order for things to work. Co-authored-by: Jacob Carlborg <doob@me.com>
…amic symbol table differ Encode macosx_version_min or build_version into the object file, originally authored by @jacob-carlborg in dlang#10476. This has been simplified to omit parsing the SDK version. Based on what I see GCC is doing (`-platform_version macos $version_min 0.0`), this information is not required in order for things to work. Co-authored-by: Jacob Carlborg <doob@me.com>
What's missing:
I'm guessing we can hardcode the platform for now since DMD doesn't support cross-compiling.