June 15, 2018
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

June 15, 2018
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)



June 15, 2018
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
June 15, 2018
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.
June 15, 2018
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.
June 15, 2018
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.
June 15, 2018
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.
June 16, 2018
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).
June 16, 2018
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.
June 16, 2018
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 ?