www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.ldc - mtriple for iphonesimulator error!

reply Calvin P <changlon gmail.com> writes:
try build for iphonesimulator get this error:


ldc2 -g -gc -O0 -c -mtriple=i386-apple-ios10 
import/core/thread/fiber.d

<inline asm>:4:2: error: unknown directive
         .type   fiber_switchContext, function
         ^
<inline asm>:22:2: error: unknown directive
         .size   fiber_switchContext, .-fiber_switchContext
         ^


what flags should I use for i386 and x86-64 iphonesimulator ?
Jun 26 2020
next sibling parent reply Jacob Carlborg <doob me.com> writes:
On 2020-06-26 13:25, Calvin P wrote:
 try build for iphonesimulator get this error:
 
 
 ldc2 -g -gc -O0 -c -mtriple=i386-apple-ios10 import/core/thread/fiber.d
 
 <inline asm>:4:2: error: unknown directive
          .type   fiber_switchContext, function
          ^
 <inline asm>:22:2: error: unknown directive
          .size   fiber_switchContext, .-fiber_switchContext
          ^
 
 
 what flags should I use for i386 and x86-64 iphonesimulator ?
Xcode uses "x86_64-apple-ios13.2-simulator". I guess you can specify any version. I have not tested D/LDC on the simulator yet. There are things that might not work. -- /Jacob Carlborg
Jun 26 2020
parent reply Calvin P <changlon gmail.com> writes:
On Friday, 26 June 2020 at 14:40:38 UTC, Jacob Carlborg wrote:
 Xcode uses "x86_64-apple-ios13.2-simulator". I guess you can 
 specify any version. I have not tested D/LDC on the simulator 
 yet. There are things that might not work.
On Friday, 26 June 2020 at 16:18:57 UTC, kinke wrote:
 On Friday, 26 June 2020 at 11:25:16 UTC, Calvin P wrote:
 what flags should I use for i386 and x86-64 iphonesimulator ?
Thx for the report. - 32-bit would need more work (i686 support for macOS was dropped some time ago and would need to be re-enabled, incl. adaptations for 32-bit ARM). The issue for the x86_64 simulator is fixed by https://github.com/ldc-developers/ldc/pull/3478.
Thanks for explain, I will try net ldc2 version to test iphonesimulator.
Jun 27 2020
parent reply kinke <noone nowhere.com> writes:
On Saturday, 27 June 2020 at 23:00:12 UTC, Calvin P wrote:
 Thanks for explain, I will try net ldc2 version to test 
 iphonesimulator.
You can download the prebuilt CI package from https://dev.azure.com/ldc-developers/ldc/_build/results?buildId=1850&view=artifacts&typ =publishedArtifacts (just like a regular release package, but with enabled LLVM/LDC assertions and thus slower at compiling). Cross-compiling to the simulator should now work out of the box via `-mtriple=x86_64-apple-ios12.0`, as prebuilt druntime and Phobos are newly included too.
Jun 27 2020
parent reply Calvin P <changlon gmail.com> writes:
On Sunday, 28 June 2020 at 00:06:43 UTC, kinke wrote:
 You can download the prebuilt CI package from 
 https://dev.azure.com/ldc-developers/ldc/_build/results?buildId=1850&view=artifacts&typ
=publishedArtifacts (just like a regular release package, but with enabled
LLVM/LDC assertions and thus slower at compiling). Cross-compiling to the
simulator should now work out of the box via `-mtriple=x86_64-apple-ios12.0`,
as prebuilt druntime and Phobos are newly included too.
Thanks a lot, I will do more test and report back. On Tuesday, 30 June 2020 at 07:51:49 UTC, Jacob Carlborg wrote:
 Do you have a need to target the iPhone simulator for i386? Is 
 x86-64 enough?
I guess x86-64 is enough. i386 only support ios10, seems outdated.
Jul 01 2020
parent Jacob Carlborg <doob me.com> writes:
On 2020-07-01 18:43, Calvin P wrote:

 I guess x86-64 is enough. i386 only support ios10,  seems outdated.
Yes, 32 bit is deprecated. -- /Jacob Carlborg
Jul 01 2020
prev sibling next sibling parent kinke <noone nowhere.com> writes:
On Friday, 26 June 2020 at 11:25:16 UTC, Calvin P wrote:
 what flags should I use for i386 and x86-64 iphonesimulator ?
Thx for the report. - 32-bit would need more work (i686 support for macOS was dropped some time ago and would need to be re-enabled, incl. adaptations for 32-bit ARM). The issue for the x86_64 simulator is fixed by https://github.com/ldc-developers/ldc/pull/3478.
Jun 26 2020
prev sibling parent Jacob Carlborg <doob me.com> writes:
On 2020-06-26 13:25, Calvin P wrote:

 what flags should I use for i386 and x86-64 iphonesimulator ?
Do you have a need to target the iPhone simulator for i386? Is x86-64 enough? -- /Jacob Carlborg
Jun 30 2020