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

Side by Side Diff: SConstruct

Issue 1667001: Change SConstruct to allow for easy specification of target library for arm c... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 10 years, 8 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2010 the V8 project authors. All rights reserved. 1 # Copyright 2010 the V8 project authors. All rights reserved.
2 # Redistribution and use in source and binary forms, with or without 2 # Redistribution and use in source and binary forms, with or without
3 # modification, are permitted provided that the following conditions are 3 # modification, are permitted provided that the following conditions are
4 # met: 4 # met:
5 # 5 #
6 # * Redistributions of source code must retain the above copyright 6 # * Redistributions of source code must retain the above copyright
7 # notice, this list of conditions and the following disclaimer. 7 # notice, this list of conditions and the following disclaimer.
8 # * Redistributions in binary form must reproduce the above 8 # * Redistributions in binary form must reproduce the above
9 # copyright notice, this list of conditions and the following 9 # copyright notice, this list of conditions and the following
10 # disclaimer in the documentation and/or other materials provided 10 # disclaimer in the documentation and/or other materials provided
(...skipping 24 matching lines...) Expand all
35 sys.path.append(join(root_dir, 'tools')) 35 sys.path.append(join(root_dir, 'tools'))
36 import js2c, utils 36 import js2c, utils
37 37
38 # ANDROID_TOP is the top of the Android checkout, fetched from the environment 38 # ANDROID_TOP is the top of the Android checkout, fetched from the environment
39 # variable 'TOP'. You will also need to set the CXX, CC, AR and RANLIB 39 # variable 'TOP'. You will also need to set the CXX, CC, AR and RANLIB
40 # environment variables to the cross-compiling tools. 40 # environment variables to the cross-compiling tools.
41 ANDROID_TOP = os.environ.get('TOP') 41 ANDROID_TOP = os.environ.get('TOP')
42 if ANDROID_TOP is None: 42 if ANDROID_TOP is None:
43 ANDROID_TOP="" 43 ANDROID_TOP=""
44 44
45 # ARM_TARGET_LIB is the path to the dynamic library to use on the target
46 # machine if cross-compiling to an arm machine. You will also need to set
47 # the additional cross-compiling environment variables to the cross compiler.
48 ARM_TARGET_LIB = os.environ.get('ARM_TARGET_LIB')
49 if ARM_TARGET_LIB:
50 ARM_LINK_FLAGS = ['-Wl,-rpath=' + ARM_TARGET_LIB + '/lib:' +
51 ARM_TARGET_LIB + '/usr/lib',
52 '-Wl,--dynamic-linker=' + ARM_TARGET_LIB +
53 '/lib/ld-linux.so.3']
54 else:
55 ARM_LINK_FLAGS = ""
56
45 # TODO: Sort these issues out properly but as a temporary solution for gcc 4.4 57 # TODO: Sort these issues out properly but as a temporary solution for gcc 4.4
46 # on linux we need these compiler flags to avoid crashes in the v8 test suite 58 # on linux we need these compiler flags to avoid crashes in the v8 test suite
47 # and avoid dtoa.c strict aliasing issues 59 # and avoid dtoa.c strict aliasing issues
48 if os.environ.get('GCC_VERSION') == '44': 60 if os.environ.get('GCC_VERSION') == '44':
49 GCC_EXTRA_CCFLAGS = ['-fno-tree-vrp', '-fno-strict-aliasing'] 61 GCC_EXTRA_CCFLAGS = ['-fno-tree-vrp', '-fno-strict-aliasing']
50 GCC_DTOA_EXTRA_CCFLAGS = [] 62 GCC_DTOA_EXTRA_CCFLAGS = []
51 else: 63 else:
52 GCC_EXTRA_CCFLAGS = [] 64 GCC_EXTRA_CCFLAGS = []
53 GCC_DTOA_EXTRA_CCFLAGS = [] 65 GCC_DTOA_EXTRA_CCFLAGS = []
54 66
(...skipping 355 matching lines...) Expand 10 before | Expand all | Expand 10 after
410 'CCFLAGS': ANDROID_FLAGS, 422 'CCFLAGS': ANDROID_FLAGS,
411 'CPPPATH': ANDROID_INCLUDES, 423 'CPPPATH': ANDROID_INCLUDES,
412 'LIBPATH': [ANDROID_TOP + '/out/target/product/generic/obj/lib', 424 'LIBPATH': [ANDROID_TOP + '/out/target/product/generic/obj/lib',
413 ANDROID_TOP + '/prebuilt/linux-x86/toolchain/arm-eabi-4.4. 0/lib/gcc/arm-eabi/4.4.0/interwork'], 425 ANDROID_TOP + '/prebuilt/linux-x86/toolchain/arm-eabi-4.4. 0/lib/gcc/arm-eabi/4.4.0/interwork'],
414 'LINKFLAGS': ANDROID_LINKFLAGS, 426 'LINKFLAGS': ANDROID_LINKFLAGS,
415 'LIBS': ['log', 'c', 'stdc++', 'm', 'gcc'], 427 'LIBS': ['log', 'c', 'stdc++', 'm', 'gcc'],
416 'mode:release': { 428 'mode:release': {
417 'CPPDEFINES': ['SK_RELEASE', 'NDEBUG'] 429 'CPPDEFINES': ['SK_RELEASE', 'NDEBUG']
418 } 430 }
419 }, 431 },
432 'arch:arm': {
433 'LINKFLAGS': ARM_LINK_FLAGS
434 },
420 }, 435 },
421 'msvc': { 436 'msvc': {
422 'all': { 437 'all': {
423 'CPPDEFINES': ['_HAS_EXCEPTIONS=0'], 438 'CPPDEFINES': ['_HAS_EXCEPTIONS=0'],
424 'LIBS': ['winmm', 'ws2_32'] 439 'LIBS': ['winmm', 'ws2_32']
425 }, 440 },
426 'library:shared': { 441 'library:shared': {
427 'CPPDEFINES': ['USING_V8_SHARED'] 442 'CPPDEFINES': ['USING_V8_SHARED']
428 }, 443 },
429 'arch:ia32': { 444 'arch:ia32': {
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
474 'CCFLAGS': ANDROID_FLAGS, 489 'CCFLAGS': ANDROID_FLAGS,
475 'CPPPATH': ANDROID_INCLUDES, 490 'CPPPATH': ANDROID_INCLUDES,
476 'LIBPATH': [ANDROID_TOP + '/out/target/product/generic/obj/lib', 491 'LIBPATH': [ANDROID_TOP + '/out/target/product/generic/obj/lib',
477 ANDROID_TOP + '/prebuilt/linux-x86/toolchain/arm-eabi-4.4. 0/lib/gcc/arm-eabi/4.4.0/interwork'], 492 ANDROID_TOP + '/prebuilt/linux-x86/toolchain/arm-eabi-4.4. 0/lib/gcc/arm-eabi/4.4.0/interwork'],
478 'LINKFLAGS': ANDROID_LINKFLAGS, 493 'LINKFLAGS': ANDROID_LINKFLAGS,
479 'LIBS': ['log', 'c', 'stdc++', 'm', 'gcc'], 494 'LIBS': ['log', 'c', 'stdc++', 'm', 'gcc'],
480 'mode:release': { 495 'mode:release': {
481 'CPPDEFINES': ['SK_RELEASE', 'NDEBUG'] 496 'CPPDEFINES': ['SK_RELEASE', 'NDEBUG']
482 } 497 }
483 }, 498 },
499 'arch:arm': {
500 'LINKFLAGS': ARM_LINK_FLAGS
501 },
484 'arch:ia32': { 502 'arch:ia32': {
485 'CCFLAGS': ['-m32'], 503 'CCFLAGS': ['-m32'],
486 'LINKFLAGS': ['-m32'] 504 'LINKFLAGS': ['-m32']
487 }, 505 },
488 'arch:x64': { 506 'arch:x64': {
489 'CCFLAGS': ['-m64'], 507 'CCFLAGS': ['-m64'],
490 'LINKFLAGS': ['-m64'] 508 'LINKFLAGS': ['-m64']
491 }, 509 },
492 'arch:mips': { 510 'arch:mips': {
493 'CPPDEFINES': ['V8_TARGET_ARCH_MIPS'], 511 'CPPDEFINES': ['V8_TARGET_ARCH_MIPS'],
(...skipping 621 matching lines...) Expand 10 before | Expand all | Expand 10 after
1115 # version of scons. Also, there's a bug in some revisions that 1133 # version of scons. Also, there's a bug in some revisions that
1116 # doesn't allow this flag to be set, so we swallow any exceptions. 1134 # doesn't allow this flag to be set, so we swallow any exceptions.
1117 # Lovely. 1135 # Lovely.
1118 try: 1136 try:
1119 SetOption('warn', 'no-deprecated') 1137 SetOption('warn', 'no-deprecated')
1120 except: 1138 except:
1121 pass 1139 pass
1122 1140
1123 1141
1124 Build() 1142 Build()
OLDNEW
« 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