Skip to content

Conversation

sbc100
Copy link
Collaborator

@sbc100 sbc100 commented Jun 18, 2019

This means that we can build it in advance and cache it and avoids
needing to pass compile flags at link time.

Internally at google we separate the compilation and linking phases such
that the compiler isn't even necessarily available during linking.

@sbc100 sbc100 requested review from kripken and quantum5 June 18, 2019 16:35
@sbc100 sbc100 force-pushed the embind_as_library branch from c5118d3 to 99fad63 Compare June 18, 2019 21:17
@sbc100 sbc100 force-pushed the embind_as_library branch from 99fad63 to 45f9740 Compare June 18, 2019 22:33
@sbc100 sbc100 changed the title Build embind as system library rather than on-demand during linking Build embind/fetch/etc as system libraries rather than compile-on-demand during linking Jun 18, 2019
Copy link
Member

@kripken kripken left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excellent!

@sbc100 sbc100 force-pushed the embind_as_library branch from 385c7b9 to 6d64353 Compare June 19, 2019 18:47
@sbc100 sbc100 force-pushed the embind_as_library branch from 6d64353 to 72cf0e8 Compare July 20, 2019 16:34
@sbc100 sbc100 force-pushed the embind_as_library branch from 72cf0e8 to d04c8ec Compare July 20, 2019 16:34
@sbc100 sbc100 merged commit a16640f into incoming Jul 21, 2019
@sbc100 sbc100 deleted the embind_as_library branch July 21, 2019 14:04
@kripken
Copy link
Member

kripken commented Jul 31, 2019

@sbc100 This caused a regression, see #9122

@kripken
Copy link
Member

kripken commented Aug 7, 2019

ping @sbc100 about this regression

sbc100 added a commit that referenced this pull request Aug 16, 2019
This is partial revert of #8817.  It turns out that all users of bind.h
have to agree on -fno-rtti.  In particular if a user passed -fno-rtti
to build their code the bind.cpp needs to be compiled with the same
settings.

Perhaps we can find a way to avoid this in the future but for now
it looks like we are stuck compiling bind.cpp on demand at link time.

Fixes: #9122
sbc100 added a commit that referenced this pull request Aug 16, 2019
This is partial revert of #8817.  It turns out that all users of bind.h
have to agree on -fno-rtti.  In particular if a user passed -fno-rtti
to build their code the bind.cpp needs to be compiled with the same
settings.

Perhaps we can find a way to avoid this in the future but for now
it looks like we are stuck compiling bind.cpp on demand at link time.

Fixes: #9122
belraquib pushed a commit to belraquib/emscripten that referenced this pull request Dec 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants