Reviewers: Jakob,
Message:
As discussed re: https://codereview.chromium.org/24550008/, this fixes the
link
error on the Window's component build. Another option would be to explicitly
reference a symbol in default.cc somewhere else in v8 (e.g., api.cc), by
doing
something like:
bool (*defaults_cc_hack)(void) =
&SetDefaultResourceConstraintsForCurrentPlatform;
Any thoughts on the preferred approach?
Description:
Explicitly include defaults.cc in the shared_library gyp target.
Explicitly include defaults.cc in the shared_library gyp target, otherwise
the whole compilation unit is stripped by the Windows linker, since none of
it's
symbols are referenced by any other compilation unit in V8.
BUG=None
Please review this at https://codereview.chromium.org/25994002/
SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge
Affected files (+7, -0 lines):
M src/defaults.cc
M tools/gyp/v8.gyp
Index: src/defaults.cc
diff --git a/src/defaults.cc b/src/defaults.cc
index
301155f94dcb24f758eecf7f2d113ab026853381..21c3236aaa9456123ed5150787f6d93d8424bc55
100644
--- a/src/defaults.cc
+++ b/src/defaults.cc
@@ -25,6 +25,9 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+// The GYP based build ends up defining USING_V8_SHARED when compiling this
+// file.
+#undef USING_V8_SHARED
#include "../include/v8-defaults.h"
#include "platform.h"
Index: tools/gyp/v8.gyp
diff --git a/tools/gyp/v8.gyp b/tools/gyp/v8.gyp
index
846472dc2dc5d7dd6852f1525e314cd2a4e551bb..83549ddf6cdf737ff96b906331f2691dd6a963b7
100644
--- a/tools/gyp/v8.gyp
+++ b/tools/gyp/v8.gyp
@@ -61,6 +61,10 @@
# Note: on non-Windows we still build this file so that gyp
# has some sources to link into the component.
'../../src/v8dll-main.cc',
+ '../../src/defaults.cc',
+ ],
+ 'include_dirs': [
+ '../../include',
],
'defines': [
'V8_SHARED',
--
--
v8-dev mailing list
v8-dev@googlegroups.com
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to v8-dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.