Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(95)

Unified Diff: build/common.gypi

Issue 18211004: Introduce -m64 flag for making x64 when the default gcc compiler is for X32 (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/common.gypi
===================================================================
--- build/common.gypi (revision 15407)
+++ build/common.gypi (working copy)
@@ -452,6 +452,26 @@
}],
],
}],
+ ['(OS=="linux") and (v8_target_arch=="x64")', {
+ # Check whether the host compiler and target compiler support the
+ # '-m64' option and set it if so.
+ 'target_conditions': [
+ ['_toolset=="host"', {
+ 'variables': {
+ 'm64flag': '<!((echo | $(echo ${CXX_host:-$(which g++)}) -m64 -E - > /dev/null 2>&1) && echo "-m64" || true)',
+ },
+ 'cflags': [ '<(m64flag)' ],
+ 'ldflags': [ '<(m64flag)' ],
+ }],
+ ['_toolset=="target"', {
+ 'variables': {
+ 'm64flag': '<!((echo | $(echo ${CXX_target:-<(CXX)}) -m64 -E - > /dev/null 2>&1) && echo "-m64" || true)',
+ },
+ 'cflags': [ '<(m64flag)' ],
+ 'ldflags': [ '<(m64flag)' ],
+ }]
+ ],
+ }],
['OS=="freebsd" or OS=="openbsd"', {
'cflags': [ '-I/usr/local/include' ],
}],
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698