-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Revert "Revert "[android] Update to NDK 23"" #39792
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
Conversation
Attempt to leave an android workaround in place. Ideally, the build would simply specify `CMAKE_SYSTEM_NAME` as CMake indicates in [cmake-toolchains(7)](https://cmake.org/cmake/help/latest/manual/cmake-toolchains.7.html#cross-compiling-for-android).
@buttaface - CMake documentation also indicates that for cross-compiling to android, you should set |
Yes, this Swift compiler repo largely doesn't conform to CMake cross-compilation. Instead, it uses its own host variable That is why I suggested that you pass in Alternatives would be to reorder this linker configuration after the translation or vice versa, but I don't know if such reordering would break other things. |
The changes needed to remove the use of the variable are beyond the authority that I have to enact. The current mixture of build, host, and target content means that a third variable is required. This will be required as long as the standard library is part of the build unfortunately. However, the tools should be conforming to the CMake cross-compilation options, and places which are not are a bug. In fact, @gottesmm has fixed a few of these before, and I have as well. If you have cases currently which do not conform to that, please let me know, and we can fix those. But, we really do want to ensure that we get this correct so that we can take advantage of the LLVM build. The reason that the There are cases where As to your idea of sinking the |
Not sure what you're referring to, I didn't mention removing any variable.
No, this Swift compiler repo explicitly rejects using traditional CMake cross-compilation with
Yes, I was leery of moving it for that reason too.
I don't think you are too familiar with the current CMake config for this repo: by using |
Btw, there is work underway to switch to CMake toolchain files, which use |
I agree with @compnerd. |
It is not clear what you agree with. He has made multiple statements, some of them deeply wrong, while you bring up some different points of when variables are set.
Yes, but as I noted above, it is always passed in by
No,
That may be the plan, but it is not how this repo works today. The standard is set by how As discussed on that earlier pull where he reverted this, the fundamental problem is that there are two ways to cross-compile the Swift host tools, which is what I do for Android, either by setting What you are "aiming to move towards" is irrelevant, it is not how this repo is built today. If this repo ever moves to using |
As I mentioned earlier, an alternative would be to move this linker config after
Just like setting |
Again, what build-script does, or does not pass in is completely irrelevant for how the cmake works. The cmake allows I think a feasible solution would be to pass in |
No, that is the "standard" for what this repo's CMake config expects, at least on the platforms where it is mostly used, Darwin and linux. I don't think it's a good idea for the Windows platform to go off in a different direction.
It absolutely requires that it be set since it largely uses
Which is not a problem since linux, Android, and all Darwin platforms like macOS and iOS pass
You're suggesting I add that to I have not heard a single reason why Saleem won't just add this variable to his Windows CI, as he does for dozens of other variables when configuring the CMake build for Windows. If that's difficult for some still unstated reason, the patch above changing the order should work too. |
What the cmake config expects is purely defined in the cmake and not by how it is being invoked. The cmake build sets the variable at a later point and even clearly states that it falls back to
It will be set in the cmake itself. My statement was that it is not required to be passed in.
Again, how the build is invoked from one particular script does not define how everything should call it. The truth is in the cmake.
There have been multiple reasons stated, that you chose to ignore and/or call wrong. The reason not to change the windows build is that it invokes the cmake as it is expected. The build works without your changes, it doesn't work with your changes. We have given you multiple options to choose from that would make your build work, without touching or breaking the Windows build. |
We are going in circles here, let me just address the last bit.
Please point me to where a single explanation was given for "why Saleem won't just add this variable to his Windows CI," either on this pull or the previous #39791. Just link to it, since you claim it was given. I can't call the reason wrong if I said it was never given: rather I called many other statements of his wrong, as I did for some of yours.
I don't think Saleem ever bothered to give an option, you gave one. That's not multiple. I gave 2-3 options, including adding |
Both @compnerd and I have given you reasons why we don't think this change is correct. The same reasons explain why we don't think changing the Windows build to match your expectations of how the cmake should be invoked is appropriate. I'm sorry if that wasn't clear from the context, but I explicitly pointed it out in my previous post.
At least two options were given. Using |
In that case, I've exhaustively argued the opposite: using
I'll stay away from the silly reasons about being incorrect that you gave and point out that practically, I use the As for Now, I don't think you can say I haven't given you reasons not to do those two, even if you disagree with them. What about my patch reordering the variables above? I have not heard a peep out of you about that option. We are spending far too much time arguing about what is really a minor issue. |
Reverts #39791