Giter Site home page Giter Site logo

Comments (7)

cbakgly avatar cbakgly commented on July 21, 2024

Compiling Console.as with clang?
No, you have to compile it with ASC.

from crossbridge.

ivanov-playkot avatar ivanov-playkot commented on July 21, 2024

Nope, I use Crossbridge_1.0.1 (MacOS X).
1.1.0 version is still beta and as far as I get it it doesn't support pthread API yet.

Command line of how I build Console.as (with custom command [CMake]):
COMMAND java -jar $ENV{FLASCC}/usr/lib/asc2.jar -merge -md -strict -AS3 ${FLASH_IMPORTS} ${AS_SRC} -outdir ${CMAKE_CURRENT_BINARY_DIR} -out Console
Where AS_SRC contains all my action script code (except AGAL) and FLASH_IMPORTS is:
set(FLASH_IMPORTS
-import $ENV{FLASCC}/usr/lib/builtin.abc
-import $ENV{FLASCC}/usr/lib/ISpecialFile.abc
-import $ENV{FLASCC}/usr/lib/CModule.abc
-import $ENV{FLASCC}/usr/lib/playerglobal.abc
)

Then I link Console.abc as follows:
-symbol-abc=${CMAKE_CURRENT_BINARY_DIR}/Console.abc

from crossbridge.

cbakgly avatar cbakgly commented on July 21, 2024

What do you get from gcc with -v flags? Probably you missed crt1_c.o

from crossbridge.

ivanov-playkot avatar ivanov-playkot commented on July 21, 2024

Explicit linking of crt1_c.o (doesn't matter "$ENV{FLASCC}/usr/lib/stdlibs_abc/crt1_c.o" or "$ENV{FLASCC}/usr/lib/crt1_c.o") results in
/private/var/crossbridge/sdk/usr/bin/ld: error: /private/var/crossbridge/sdk/usr/bin/../../usr/lib/crt1_c.o: multiple definition of '__start1'

The reason of the lack of __start1 with -O4 is that this function is being automatically removed on linking as unused symbol and there is no way to prevent it. Everything is fine without -O4.
You can check it: the same problem is if you build Stage3D sample with -O4 so it's not my building issue.

from crossbridge.

cbakgly avatar cbakgly commented on July 21, 2024

With -O4, llvm will strip out all the symbols being without reference during LTO.
But for basic symbols used in Flascc, you have to keep it through -flto-api plus anyone you want to keep for your code.

Without O4 = without symbol stripping.

As to the sample, I run it without any issue. The sample itself is compiled with O4, isn't it?

Guess I didn't catch your question wholly.
Just if you use O4, then use it with flto-api.

from crossbridge.

ivanov-playkot avatar ivanov-playkot commented on July 21, 2024

Oh, it was my mistake (wrong path to exports.txt in -flto-api). I've understood that it's possible after your message that symbols are not being removed in non-O4 builds. Thank you.

from crossbridge.

cbakgly avatar cbakgly commented on July 21, 2024

Glad :D

from crossbridge.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.