www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - IOS support status

reply makedgreatagain <patrick.kh7788 gmail.com> writes:
The last IOS cross compiler 
https://github.com/smolt/ldc-iphone-dev/releases based on 
0.17.0-alpha1, which is 3 years old.

I want to ask for suggestion, how can i build a cross  LDC2 
compiler with just betterC function to work.

Thanks in advance.
Jun 06 2018
parent reply Joakim <dlang joakim.fea.st> writes:
On Thursday, 7 June 2018 at 05:58:48 UTC, makedgreatagain wrote:
 The last IOS cross compiler 
 https://github.com/smolt/ldc-iphone-dev/releases based on 
 0.17.0-alpha1, which is 3 years old.

 I want to ask for suggestion, how can i build a cross  LDC2 
 compiler with just betterC function to work.
As you can see, the guy who did a lot of work with getting D running on iOS and other non-Mac Apple platforms has not been able to do anything with it for the last year or two. Looking at his ldc fork, there's not much he had to change to the compiler by the end: https://github.com/smolt/ldc/commits/ios You could try applying those same patches to the latest ldc release and get it working. If you just want betterC, that's all you need, though I can't imagine it would take much to get druntime and Phobos updated too, as he had them both working well a couple years ago. We are looking for someone to take over the iOS port, so if you or someone else is interested, please try it out. You can ask technical questions of the ldc devs directly in our forum or github: https://forum.dlang.org/group/ldc https://github.com/ldc-developers/ldc/
Jun 07 2018
parent reply makedgreatagain <patrick.kh7788 gmail.com> writes:
On Thursday, 7 June 2018 at 07:58:19 UTC, Joakim wrote:
 On Thursday, 7 June 2018 at 05:58:48 UTC, makedgreatagain wrote:
 The last IOS cross compiler 
 https://github.com/smolt/ldc-iphone-dev/releases based on 
 0.17.0-alpha1, which is 3 years old.

 I want to ask for suggestion, how can i build a cross  LDC2 
 compiler with just betterC function to work.
As you can see, the guy who did a lot of work with getting D running on iOS and other non-Mac Apple platforms has not been able to do anything with it for the last year or two. Looking at his ldc fork, there's not much he had to change to the compiler by the end: https://github.com/smolt/ldc/commits/ios You could try applying those same patches to the latest ldc release and get it working. If you just want betterC, that's all you need, though I can't imagine it would take much to get druntime and Phobos updated too, as he had them both working well a couple years ago. We are looking for someone to take over the iOS port, so if you or someone else is interested, please try it out. You can ask technical questions of the ldc devs directly in our forum or github: https://forum.dlang.org/group/ldc https://github.com/ldc-developers/ldc/
Thanks for you suggestion Joakim. I try follow your suggestion, get all commit from origin branch (116 commit by Dan Olson fro IOS brnach). When I try cherry pick the first commit, get conflict the line number is 6232. (the ios branch is base on cpp and master ldc is move to d). I will try more but I guess It is hard for me to made it work.
Jun 07 2018
parent reply Joakim <dlang joakim.fea.st> writes:
On Thursday, 7 June 2018 at 11:58:58 UTC, makedgreatagain wrote:
 On Thursday, 7 June 2018 at 07:58:19 UTC, Joakim wrote:
 [...]
Thanks for you suggestion Joakim. I try follow your suggestion, get all commit from origin branch (116 commit by Dan Olson fro IOS brnach). When I try cherry pick the first commit, get conflict the line number is 6232. (the ios branch is base on cpp and master ldc is move to d). I will try more but I guess It is hard for me to made it work.
Huh, I didn't look that far back in the branch, may not be worth merging. How is his last release working? Do you want only betterC? If so, you may be better off backporting the betterC patch that got it working later, shouldn't be much to that one.
Jun 07 2018
parent reply makedgreatagain <patrick.kh7788 gmail.com> writes:
On Thursday, 7 June 2018 at 14:12:15 UTC, Joakim wrote:
 On Thursday, 7 June 2018 at 11:58:58 UTC, makedgreatagain wrote:
 On Thursday, 7 June 2018 at 07:58:19 UTC, Joakim wrote:
 [...]
Thanks for you suggestion Joakim. I try follow your suggestion, get all commit from origin branch (116 commit by Dan Olson fro IOS brnach). When I try cherry pick the first commit, get conflict the line number is 6232. (the ios branch is base on cpp and master ldc is move to d). I will try more but I guess It is hard for me to made it work.
Huh, I didn't look that far back in the branch, may not be worth merging. How is his last release working? Do you want only betterC? If so, you may be better off backporting the betterC patch that got it working later, shouldn't be much to that one.
Thanks for your help. The side thing is betterC change also base on d based branch, which is very hard to backporting to cpp branch.
Jun 10 2018
parent reply Joakim <dlang joakim.fea.st> writes:
On Monday, 11 June 2018 at 02:58:28 UTC, makedgreatagain wrote:
 On Thursday, 7 June 2018 at 14:12:15 UTC, Joakim wrote:
 On Thursday, 7 June 2018 at 11:58:58 UTC, makedgreatagain 
 wrote:
 On Thursday, 7 June 2018 at 07:58:19 UTC, Joakim wrote:
 [...]
Thanks for you suggestion Joakim. I try follow your suggestion, get all commit from origin branch (116 commit by Dan Olson fro IOS brnach). When I try cherry pick the first commit, get conflict the line number is 6232. (the ios branch is base on cpp and master ldc is move to d). I will try more but I guess It is hard for me to made it work.
Huh, I didn't look that far back in the branch, may not be worth merging. How is his last release working? Do you want only betterC? If so, you may be better off backporting the betterC patch that got it working later, shouldn't be much to that one.
Thanks for your help. The side thing is betterC change also base on d based branch, which is very hard to backporting to cpp branch.
No, it only disables 4-5 things, so while you're right that it applies towards ddmd, it should be pretty easy to manually backport to the old C++ frontend. I plan to do so for the ltsmaster branch of ldc, its last C++ version, this week: you can apply that pull to Dan's ios branch or easily port it yourself.
Jun 10 2018
parent reply Joakim <dlang joakim.fea.st> writes:
On Monday, 11 June 2018 at 04:02:15 UTC, Joakim wrote:
 On Monday, 11 June 2018 at 02:58:28 UTC, makedgreatagain wrote:
 On Thursday, 7 June 2018 at 14:12:15 UTC, Joakim wrote:
 [...]
Thanks for your help. The side thing is betterC change also base on d based branch, which is very hard to backporting to cpp branch.
No, it only disables 4-5 things, so while you're right that it applies towards ddmd, it should be pretty easy to manually backport to the old C++ frontend. I plan to do so for the ltsmaster branch of ldc, its last C++ version, this week: you can apply that pull to Dan's ios branch or easily port it yourself.
My betterC backport is up, try it on Dan's iOS branch: https://github.com/ldc-developers/ldc/pull/2748
Jun 11 2018
next sibling parent makedgreatagain <patrick.kh7788 gmail.com> writes:
On Tuesday, 12 June 2018 at 04:23:51 UTC, Joakim wrote:
 On Monday, 11 June 2018 at 04:02:15 UTC, Joakim wrote:
 On Monday, 11 June 2018 at 02:58:28 UTC, makedgreatagain wrote:
 On Thursday, 7 June 2018 at 14:12:15 UTC, Joakim wrote:
 [...]
Thanks for your help. The side thing is betterC change also base on d based branch, which is very hard to backporting to cpp branch.
No, it only disables 4-5 things, so while you're right that it applies towards ddmd, it should be pretty easy to manually backport to the old C++ frontend. I plan to do so for the ltsmaster branch of ldc, its last C++ version, this week: you can apply that pull to Dan's ios branch or easily port it yourself.
My betterC backport is up, try it on Dan's iOS branch: https://github.com/ldc-developers/ldc/pull/2748
Thanks, this is very helpful.
Jun 12 2018
prev sibling parent reply makedgreatagain <patrick.kh7788 gmail.com> writes:
On Tuesday, 12 June 2018 at 04:23:51 UTC, Joakim wrote:
 On Monday, 11 June 2018 at 04:02:15 UTC, Joakim wrote:
 On Monday, 11 June 2018 at 02:58:28 UTC, makedgreatagain wrote:
 On Thursday, 7 June 2018 at 14:12:15 UTC, Joakim wrote:
 [...]
Thanks for your help. The side thing is betterC change also base on d based branch, which is very hard to backporting to cpp branch.
No, it only disables 4-5 things, so while you're right that it applies towards ddmd, it should be pretty easy to manually backport to the old C++ frontend. I plan to do so for the ltsmaster branch of ldc, its last C++ version, this week: you can apply that pull to Dan's ios branch or easily port it yourself.
My betterC backport is up, try it on Dan's iOS branch: https://github.com/ldc-developers/ldc/pull/2748
When I cherry pick the commit 08041422, git report the IOS branch dose not have function `getCAssertFunctionName` , `DtoCAssert` there seems missing some old commit from IOS branch to ltsmaster branch. I don't know how many and how to compare to get all the missing commit to work. Thanks for you help again.
Jun 12 2018
parent reply Joakim <dlang joakim.fea.st> writes:
On Wednesday, 13 June 2018 at 02:18:55 UTC, makedgreatagain wrote:
 On Tuesday, 12 June 2018 at 04:23:51 UTC, Joakim wrote:
 On Monday, 11 June 2018 at 04:02:15 UTC, Joakim wrote:
 On Monday, 11 June 2018 at 02:58:28 UTC, makedgreatagain 
 wrote:
 On Thursday, 7 June 2018 at 14:12:15 UTC, Joakim wrote:
 [...]
Thanks for your help. The side thing is betterC change also base on d based branch, which is very hard to backporting to cpp branch.
No, it only disables 4-5 things, so while you're right that it applies towards ddmd, it should be pretty easy to manually backport to the old C++ frontend. I plan to do so for the ltsmaster branch of ldc, its last C++ version, this week: you can apply that pull to Dan's ios branch or easily port it yourself.
My betterC backport is up, try it on Dan's iOS branch: https://github.com/ldc-developers/ldc/pull/2748
When I cherry pick the commit 08041422, git report the IOS branch dose not have function `getCAssertFunctionName` , `DtoCAssert` there seems missing some old commit from IOS branch to ltsmaster branch. I don't know how many and how to compare to get all the missing commit to work. Thanks for you help again.
Are you starting from the top, with the oldest commit first? Because the older commits supply those functions. You may not want to cherry-pick if you're not used to doing it, and just apply the patch itself: https://patch-diff.githubusercontent.com/raw/ldc-developers/ldc/pull/2748.diff
Jun 12 2018
parent reply makedgreatagain <patrick.kh7788 gmail.com> writes:
On Wednesday, 13 June 2018 at 02:33:22 UTC, Joakim wrote:
 On Wednesday, 13 June 2018 at 02:18:55 UTC, makedgreatagain 
 wrote:
 When I cherry pick the commit 08041422, git report the IOS 
 branch dose not have function `getCAssertFunctionName` , 
 `DtoCAssert`  there seems missing some old commit from  IOS 
 branch to ltsmaster branch.  I don't know how many and how to 
 compare to get all the missing commit to work.

 Thanks for you help again.
Are you starting from the top, with the oldest commit first? Because the older commits supply those functions. You may not want to cherry-pick if you're not used to doing it, and just apply the patch itself: https://patch-diff.githubusercontent.com/raw/ldc-developers/ldc/pull/2748.diff
I has try a lot diff way, none of them work. to apply this patch it should this error: error: patch failed: driver/main.cpp:860 error: driver/main.cpp: patch does not apply error: patch failed: gen/module.cpp:743 error: gen/module.cpp: patch does not apply
Jun 14 2018
parent reply makedgreatagain <patrick.kh7788 gmail.com> writes:
On Friday, 15 June 2018 at 05:26:57 UTC, makedgreatagain wrote:
 On Wednesday, 13 June 2018 at 02:33:22 UTC, Joakim wrote:
 On Wednesday, 13 June 2018 at 02:18:55 UTC, makedgreatagain 
 wrote:
 When I cherry pick the commit 08041422, git report the IOS 
 branch dose not have function `getCAssertFunctionName` , 
 `DtoCAssert`  there seems missing some old commit from  IOS 
 branch to ltsmaster branch.  I don't know how many and how to 
 compare to get all the missing commit to work.

 Thanks for you help again.
Are you starting from the top, with the oldest commit first? Because the older commits supply those functions. You may not want to cherry-pick if you're not used to doing it, and just apply the patch itself: https://patch-diff.githubusercontent.com/raw/ldc-developers/ldc/pull/2748.diff
I has try a lot diff way, none of them work. to apply this patch it should this error: error: patch failed: driver/main.cpp:860 error: driver/main.cpp: patch does not apply error: patch failed: gen/module.cpp:743 error: gen/module.cpp: patch does not apply
I use git apply --reject --whitespace=fix to patch and it working now. but I can not build the llvm use Dan Olson script or cmake, it report error. (I can build new llvm without problem, but after I add some patch or merge it will break) : command not found/apple/ldc-iphone-dev/llvm/autoconf/config.guess: line 6: : command not found/apple/ldc-iphone-dev/llvm/autoconf/config.guess: line 8: : command not found/apple/ldc-iphone-dev/llvm/autoconf/config.guess: line 28: : command not found/apple/ldc-iphone-dev/llvm/autoconf/config.guess: line 29: : command not found/apple/ldc-iphone-dev/llvm/autoconf/config.guess: line 40: : command not found/apple/ldc-iphone-dev/llvm/autoconf/config.guess: line 42: : command not found/apple/ldc-iphone-dev/llvm/autoconf/config.guess: line 54: : command not found/apple/ldc-iphone-dev/llvm/autoconf/config.guess: line 65: : command not found/apple/ldc-iphone-dev/llvm/autoconf/config.guess: line 68: 'var/root/.projects/apple/ldc-iphone-dev/llvm/autoconf/config.guess: line 71: syntax error near unexpected token `in 'var/root/.projects/apple/ldc-iphone-dev/llvm/autoconf/config.guess: line 71: ` case $1 in CMake Error at cmake/modules/GetHostTriple.cmake:24 (message): Failed to execute /var/root/.projects/apple/ldc-iphone-dev/llvm/autoconf/config.guess Call Stack (most recent call first): cmake/config-ix.cmake:333 (get_host_triple) CMakeLists.txt:336 (include)
Jun 14 2018
parent reply Joakim <dlang joakim.fea.st> writes:
On Friday, 15 June 2018 at 05:35:02 UTC, makedgreatagain wrote:
 On Friday, 15 June 2018 at 05:26:57 UTC, makedgreatagain wrote:
 [...]
I use git apply --reject --whitespace=fix to patch and it working now. [...]
Not sure about llvm, but rather than use his script, it should work with CMake? We normally use CMake and I've never had an issue with it: https://wiki.dlang.org/Building_LDC_from_source#Building_LLVM_manually
Jun 14 2018
parent reply makedgreatagain <patrick.kh7788 gmail.com> writes:
On Friday, 15 June 2018 at 05:42:48 UTC, Joakim wrote:
 On Friday, 15 June 2018 at 05:35:02 UTC, makedgreatagain wrote:
 On Friday, 15 June 2018 at 05:26:57 UTC, makedgreatagain wrote:
 [...]
I use git apply --reject --whitespace=fix to patch and it working now. [...]
Not sure about llvm, but rather than use his script, it should work with CMake? We normally use CMake and I've never had an issue with it: https://wiki.dlang.org/Building_LDC_from_source#Building_LLVM_manually
Cmake build recent LLVM is ok, but not the ios llvm for d, report same error.
Jun 15 2018
parent reply Joakim <dlang joakim.fea.st> writes:
On Friday, 15 June 2018 at 11:25:11 UTC, makedgreatagain wrote:
 On Friday, 15 June 2018 at 05:42:48 UTC, Joakim wrote:
 On Friday, 15 June 2018 at 05:35:02 UTC, makedgreatagain wrote:
 On Friday, 15 June 2018 at 05:26:57 UTC, makedgreatagain 
 wrote:
 [...]
I use git apply --reject --whitespace=fix to patch and it working now. [...]
Not sure about llvm, but rather than use his script, it should work with CMake? We normally use CMake and I've never had an issue with it: https://wiki.dlang.org/Building_LDC_from_source#Building_LLVM_manually
Cmake build recent LLVM is ok, but not the ios llvm for d, report same error.
You're using his llvm 3.6.2 branch with no changes? I don't see how his build scripts would stop working for that, you'll have to investigate.
Jun 15 2018
parent reply makedgreatagain <patrick.kh7788 gmail.com> writes:
On Friday, 15 June 2018 at 11:30:40 UTC, Joakim wrote:
 On Friday, 15 June 2018 at 11:25:11 UTC, makedgreatagain wrote:
 On Friday, 15 June 2018 at 05:42:48 UTC, Joakim wrote:

 Cmake build recent LLVM is ok, but not the ios llvm for d, 
 report same error.
You're using his llvm 3.6.2 branch with no changes? I don't see how his build scripts would stop working for that, you'll have to investigate.
Yes, I use git submodule update --init. not touch any thing still not be able to build.
Jun 15 2018
parent reply Joakim <dlang joakim.fea.st> writes:
On Friday, 15 June 2018 at 13:18:25 UTC, makedgreatagain wrote:
 On Friday, 15 June 2018 at 11:30:40 UTC, Joakim wrote:
 On Friday, 15 June 2018 at 11:25:11 UTC, makedgreatagain wrote:
 On Friday, 15 June 2018 at 05:42:48 UTC, Joakim wrote:

 Cmake build recent LLVM is ok, but not the ios llvm for d, 
 report same error.
You're using his llvm 3.6.2 branch with no changes? I don't see how his build scripts would stop working for that, you'll have to investigate.
Yes, I use git submodule update --init. not touch any thing still not be able to build.
Sounds like something wrong in your environment then, as I just checked out his last llvm ios-release_362 branch in a linux/x64 VPS, ran the configure command from his llvm script (see link), ran make, and everything's building fine: https://github.com/smolt/ldc-iphone-dev/blob/master/tools/prepmake-llvm You'll have to investigate what's different about your build environment that you can't seem to build an almost-stock llvm 3.6.2.
Jun 15 2018
parent reply makedgreatagain <patrick.kh7788 gmail.com> writes:
On Friday, 15 June 2018 at 14:50:08 UTC, Joakim wrote:
 On Friday, 15 June 2018 at 13:18:25 UTC, makedgreatagain wrote:
 On Friday, 15 June 2018 at 11:30:40 UTC, Joakim wrote:
Sounds like something wrong in your environment then, as I just checked out his last llvm ios-release_362 branch in a linux/x64 VPS, ran the configure command from his llvm script (see link), ran make, and everything's building fine: https://github.com/smolt/ldc-iphone-dev/blob/master/tools/prepmake-llvm You'll have to investigate what's different about your build environment that you can't seem to build an almost-stock llvm 3.6.2.
Thanks a lot, after I modify llvm/autoconf/AutoRegen.sh (to allow use the version of my pc), and regenerate config.guess, cmake build start to working. and now I get a old ldc version with betterC support. (I am not test it on iphone yet, but it can build). now I wish some maybe there is not much modify to bring the last ldc master to iphone(only betterC work still can do more stuff, with less bug compare to druntime).
Jun 16 2018
parent reply Joakim <dlang joakim.fea.st> writes:
On Saturday, 16 June 2018 at 08:10:35 UTC, makedgreatagain wrote:
 On Friday, 15 June 2018 at 14:50:08 UTC, Joakim wrote:
 [...]
Thanks a lot, after I modify llvm/autoconf/AutoRegen.sh (to allow use the version of my pc), and regenerate config.guess, cmake build start to working. and now I get a old ldc version with betterC support. (I am not test it on iphone yet, but it can build).
Good to hear.
 now I wish some maybe there is not much modify to bring the 
 last ldc master to iphone(only betterC work still can do more 
 stuff, with less bug compare to druntime).
Looks like he modified about 35 files in ldc for his iOS branch, the diff is not that big. If you're diligent, you could probably port it to master in a day.
Jun 16 2018
parent reply makedgreatagain <patrick.kh7788 gmail.com> writes:
On Saturday, 16 June 2018 at 10:40:44 UTC, Joakim wrote:
 On Saturday, 16 June 2018 at 08:10:35 UTC, makedgreatagain 
 wrote:
 On Friday, 15 June 2018 at 14:50:08 UTC, Joakim wrote:
 [...]
Thanks a lot, after I modify llvm/autoconf/AutoRegen.sh (to allow use the version of my pc), and regenerate config.guess, cmake build start to working. and now I get a old ldc version with betterC support. (I am not test it on iphone yet, but it can build).
Good to hear.
 now I wish some maybe there is not much modify to bring the 
 last ldc master to iphone(only betterC work still can do more 
 stuff, with less bug compare to druntime).
Looks like he modified about 35 files in ldc for his iOS branch, the diff is not that big. If you're diligent, you could probably port it to master in a day.
I dont know what to deal with global.params.targetTriple.isOSDarwin and global.params.targetTriple.isMacOSX when I try merge it into ldc/master. should I keep both or just one ?
Jun 16 2018
next sibling parent reply makedgreatagain <patrick.kh7788 gmail.com> writes:
On Saturday, 16 June 2018 at 12:59:48 UTC, makedgreatagain wrote:
 On Saturday, 16 June 2018 at 10:40:44 UTC, Joakim wrote:
 I dont know what to deal with 
 global.params.targetTriple.isOSDarwin and 
 global.params.targetTriple.isMacOSX when I try merge it into 
 ldc/master.  should I keep both or just one ?
And should I keep merge USE_OSX_TARGET_REAL or the ldc master already fix this? if I do not use real type in IOS i can skip this ?
Jun 16 2018
parent Joakim <dlang joakim.fea.st> writes:
On Saturday, 16 June 2018 at 13:18:34 UTC, makedgreatagain wrote:
 On Saturday, 16 June 2018 at 12:59:48 UTC, makedgreatagain 
 wrote:
 On Saturday, 16 June 2018 at 10:40:44 UTC, Joakim wrote:
 I dont know what to deal with 
 global.params.targetTriple.isOSDarwin and 
 global.params.targetTriple.isMacOSX when I try merge it into 
 ldc/master.  should I keep both or just one ?
And should I keep merge USE_OSX_TARGET_REAL or the ldc master already fix this? if I do not use real type in IOS i can skip this ?
No idea, I haven't really used iOS, as I haven't bought an Apple device in almost 15 years. It's your port, you get to make the decisions. :)
Jun 16 2018
prev sibling parent reply Uknown <sireeshkodali1 gmail.com> writes:
On Saturday, 16 June 2018 at 12:59:48 UTC, makedgreatagain wrote:
 On Saturday, 16 June 2018 at 10:40:44 UTC, Joakim wrote:
 On Saturday, 16 June 2018 at 08:10:35 UTC, makedgreatagain 
 wrote:
 On Friday, 15 June 2018 at 14:50:08 UTC, Joakim wrote:
[...]
I dont know what to deal with global.params.targetTriple.isOSDarwin and global.params.targetTriple.isMacOSX when I try merge it into ldc/master. should I keep both or just one ?
Darwin can generally imply either macOS, tvOS or iOS, as far as I can tell.
Jun 16 2018
parent reply makedgreatagain <patrick.kh7788 gmail.com> writes:
On Sunday, 17 June 2018 at 01:50:14 UTC, Uknown wrote:
 On Saturday, 16 June 2018 at 12:59:48 UTC, makedgreatagain

 Darwin can generally imply either macOS, tvOS or iOS, as far as 
 I can tell.
Thanks for tips. Joakim I speed the weekend on this and with no good results. abi-ios is not work with lts master anymore, because a lot code is changed.(not sure how to fix it) And after cherry pick ios-llvm tls patch to LLVM 37 or 60, none of them work. I try fix but not able to made it buildable. (base on ldc issue 1081, llvm no need tls patch if I understand correct) and make file also break so I has to remove the runtime folder to build ldc(not buildable because cpp error).
Jun 18 2018
parent reply Joakim <dlang joakim.fea.st> writes:
On Monday, 18 June 2018 at 07:02:44 UTC, makedgreatagain wrote:
 On Sunday, 17 June 2018 at 01:50:14 UTC, Uknown wrote:
 On Saturday, 16 June 2018 at 12:59:48 UTC, makedgreatagain

 Darwin can generally imply either macOS, tvOS or iOS, as far 
 as I can tell.
Thanks for tips. Joakim I speed the weekend on this and with no good results. abi-ios is not work with lts master anymore, because a lot code is changed.(not sure how to fix it)
Do you mean ltsmaster or master? There shouldn't be much change with the former.
 And after cherry pick ios-llvm tls patch to LLVM 37 or 60, none 
 of them work. I try fix but not able to made it buildable. 
 (base on ldc issue 1081, llvm no need tls patch if I understand 
 correct)
The TLS patches shouldn't be needed after llvm 3.8 or so, ie you should be able to use a stock llvm for iOS: https://forum.dlang.org/thread/m237o97vf0.fsf comcast.net
 and make file also break so I has to remove the runtime folder 
 to build ldc(not buildable because cpp error).
That makes no sense: there are no C++ files in the runtime, only C and D. Anyway, if you only care about betterC, you don't want to build the runtime, so doesn't matter. My suggestion is that you simply build his working ldc for iOS project, but with the betterC patch I linked you backported. Once you're sure that's working, you can try these more advanced steps. Have you tried that? It's not clear.
Jun 19 2018
parent reply makedgreatagain <patrick.kh7788 gmail.com> writes:
On Wednesday, 20 June 2018 at 05:26:25 UTC, Joakim wrote:
 Do you mean ltsmaster or master? There shouldn't be much change 
 with the former.
master branch.
 The TLS patches shouldn't be needed after llvm 3.8 or so, ie 
 you should be able to use a stock llvm for iOS:

 https://forum.dlang.org/thread/m237o97vf0.fsf comcast.net
this is great.
 That makes no sense: there are no C++ files in the runtime, 
 only C and D. Anyway, if you only care about betterC, you don't 
 want to build the runtime, so doesn't matter.

 My suggestion is that you simply build his working ldc for iOS 
 project, but with the betterC patch I linked you backported. 
 Once you're sure that's working, you can try these more 
 advanced steps. Have you tried that? It's not clear.
the origin ldc with your patch is working. but I find it is very limit betterC support with old version(some code will not work, and fixed at late dmd/ldc version). The patched ldc not build because a lot old code Dan Olson write is not working any more( ldc cpp interface changed, or llvm cpp interface changed). I try to fix but never get it working. (I patch all 36 files)
Jun 20 2018
next sibling parent Joakim <dlang joakim.fea.st> writes:
On Wednesday, 20 June 2018 at 07:25:37 UTC, makedgreatagain wrote:
 On Wednesday, 20 June 2018 at 05:26:25 UTC, Joakim wrote:
 Do you mean ltsmaster or master? There shouldn't be much 
 change with the former.
master branch.
 The TLS patches shouldn't be needed after llvm 3.8 or so, ie 
 you should be able to use a stock llvm for iOS:

 https://forum.dlang.org/thread/m237o97vf0.fsf comcast.net
this is great.
 That makes no sense: there are no C++ files in the runtime, 
 only C and D. Anyway, if you only care about betterC, you 
 don't want to build the runtime, so doesn't matter.

 My suggestion is that you simply build his working ldc for iOS 
 project, but with the betterC patch I linked you backported. 
 Once you're sure that's working, you can try these more 
 advanced steps. Have you tried that? It's not clear.
the origin ldc with your patch is working. but I find it is very limit betterC support with old version(some code will not work, and fixed at late dmd/ldc version). The patched ldc not build because a lot old code Dan Olson write is not working any more( ldc cpp interface changed, or llvm cpp interface changed). I try to fix but never get it working. (I patch all 36 files)
Looking at his commits diffed against ltsmaster, there isn't much to port, particularly once you throw out the TLS commits and the floating-point cross-compilation code that has since been added in the official repo, maybe 500-800 lines largely in his new iOS ABI files: https://github.com/ldc-developers/ldc/compare/ltsmaster...smolt:ios Of course, adapting that diff to upstream takes careful knowledge of ABI details and how llvm and LDC handle them, which you may not be familiar with. You may want to see if one of the LDC devs is interested in porting this patch upstream, by posting in their forum: https://forum.dlang.org/group/ldc Some of them do consulting work for companies, maybe you could pay one of them to do it.
Jun 21 2018
prev sibling parent elvisxzhou <elvis.x.zhou gmail.com> writes:
On Wednesday, 20 June 2018 at 07:25:37 UTC, makedgreatagain wrote:
 On Wednesday, 20 June 2018 at 05:26:25 UTC, Joakim wrote:
 [...]
master branch.
 [...]
this is great.
 [...]
the origin ldc with your patch is working. but I find it is very limit betterC support with old version(some code will not work, and fixed at late dmd/ldc version). The patched ldc not build because a lot old code Dan Olson write is not working any more( ldc cpp interface changed, or llvm cpp interface changed). I try to fix but never get it working. (I patch all 36 files)
Any update?
Jun 28 2018