1 # This file is generated; do not edit. 2 3 import os 4 5 Import("env") 6 7 env = env.Clone(COMPONENT_NAME='base', 8 TARGET_NAME='base') 9 10 configurations = { 11 'Debug' : { 12 'Append' : dict( 13 CCFLAGS = [ 14 '-Werror', 15 '-pthread', 16 '-fno-exceptions', 17 '-fno-asynchronous-unwind-tables', 18 '-fvisibility=hidden', 19 '-Wall', 20 '-D_FILE_OFFSET_BITS=64', 21 '-Wno-write-strings', 22 '-DPNG_NO_MMX_CODE', 23 '-pthread', 24 '-I/usr/include/gtk-2.0', 25 '-I/usr/lib/gtk-2.0/include', 26 '-I/usr/include/atk-1.0', 27 '-I/usr/include/cairo', 28 '-I/usr/include/pango-1.0', 29 '-I/usr/include/glib-2.0', 30 '-I/usr/lib/glib-2.0/include', 31 '-I/usr/include/freetype2', 32 '-I/usr/include/libpng12', 33 '-I/usr/include/pixman-1', 34 '-I/usr/include/nss', 35 '-I/usr/include/nspr', 36 '-O0', 37 '-g' 38 ], 39 CPPDEFINES = [ 40 '__STDC_FORMAT_MACROS', 41 'CHROMIUM_BUILD', 42 '_DEBUG' 43 ], 44 CPPPATH = [ 45 env.Dir('$SRC_DIR/base/..') 46 ], 47 CXXFLAGS = [ 48 '-fno-rtti', 49 '-fno-threadsafe-statics', 50 '-fvisibility-inlines-hidden' 51 ], 52 LINKFLAGS = [ 53 '-pthread', 54 '-rdynamic' 55 ], 56 ), 57 'FilterOut' : dict( 58 ), 59 'Replace' : dict( 60 FLOCK_LDMODULE = ['flock', '$TOP_BUILDDIR/linker.lock', '$LDMODULE'], 61 FLOCK_LINK = ['flock', '$TOP_BUILDDIR/linker.lock', '$LINK'], 62 FLOCK_SHLINK = ['flock', '$TOP_BUILDDIR/linker.lock', '$SHLINK'], 63 IMPLICIT_COMMAND_DEPENDENCIES = '0', 64 LDMODULECOM = [['$FLOCK_LDMODULE', 65 '-o', 66 '$TARGET', 67 '$_LIBDIRFLAGS', 68 '$LDMODULEFLAGS', 69 '$SOURCES', 70 '-Wl,--start-group', 71 '$_LIBFLAGS', 72 '-Wl,--end-group']], 73 LIBPATH = ['$LIB_DIR'], 74 LINKCOM = [['$FLOCK_LINK', 75 '-o', 76 '$TARGET', 77 '$_LIBDIRFLAGS', 78 '$LINKFLAGS', 79 '$SOURCES', 80 '-Wl,--start-group', 81 '$_LIBFLAGS', 82 '-Wl,--end-group']], 83 SHLINKCOM = [['$FLOCK_SHLINK', 84 '-o', 85 '$TARGET', 86 '$_LIBDIRFLAGS', 87 '$SHLINKFLAGS', 88 '$SOURCES', 89 '-Wl,--start-group', 90 '$_LIBFLAGS', 91 '-Wl,--end-group']], 92 ), 93 'ImportExternal' : [ 94 'AS', 95 'CC', 96 'CXX', 97 'LINK', 98 ], 99 'PropagateExternal' : [ 100 'AS', 101 'CC', 102 'CCACHE_DIR', 103 'CXX', 104 'DISTCC_DIR', 105 'DISTCC_HOSTS', 106 'HOME', 107 'INCLUDE_SERVER_ARGS', 108 'INCLUDE_SERVER_PORT', 109 'LINK', 110 'CHROME_BUILD_TYPE', 111 'CHROMIUM_BUILD', 112 'OFFICIAL_BUILD', 113 ], 114 }, 115 'Release' : { 116 'Append' : dict( 117 CCFLAGS = [ 118 '-Werror', 119 '-pthread', 120 '-fno-exceptions', 121 '-fno-asynchronous-unwind-tables', 122 '-fvisibility=hidden', 123 '-Wall', 124 '-D_FILE_OFFSET_BITS=64', 125 '-Wno-write-strings', 126 '-DPNG_NO_MMX_CODE', 127 '-pthread', 128 '-I/usr/include/gtk-2.0', 129 '-I/usr/lib/gtk-2.0/include', 130 '-I/usr/include/atk-1.0', 131 '-I/usr/include/cairo', 132 '-I/usr/include/pango-1.0', 133 '-I/usr/include/glib-2.0', 134 '-I/usr/lib/glib-2.0/include', 135 '-I/usr/include/freetype2', 136 '-I/usr/include/libpng12', 137 '-I/usr/include/pixman-1', 138 '-I/usr/include/nss', 139 '-I/usr/include/nspr', 140 '-O2', 141 '-fno-ident', 142 '-fdata-sections', 143 '-ffunction-sections' 144 ], 145 CPPDEFINES = [ 146 '__STDC_FORMAT_MACROS', 147 'CHROMIUM_BUILD', 148 'NDEBUG', 149 'NVALGRIND' 150 ], 151 CPPPATH = [ 152 env.Dir('$SRC_DIR/base/..') 153 ], 154 CXXFLAGS = [ 155 '-fno-rtti', 156 '-fno-threadsafe-statics', 157 '-fvisibility-inlines-hidden' 158 ], 159 LINKFLAGS = [ 160 '-pthread', 161 '-Wl,--gc-sections' 162 ], 163 ), 164 'FilterOut' : dict( 165 ), 166 'Replace' : dict( 167 FLOCK_LDMODULE = ['flock', '$TOP_BUILDDIR/linker.lock', '$LDMODULE'], 168 FLOCK_LINK = ['flock', '$TOP_BUILDDIR/linker.lock', '$LINK'], 169 FLOCK_SHLINK = ['flock', '$TOP_BUILDDIR/linker.lock', '$SHLINK'], 170 IMPLICIT_COMMAND_DEPENDENCIES = '0', 171 LDMODULECOM = [['$FLOCK_LDMODULE', 172 '-o', 173 '$TARGET', 174 '$_LIBDIRFLAGS', 175 '$LDMODULEFLAGS', 176 '$SOURCES', 177 '-Wl,--start-group', 178 '$_LIBFLAGS', 179 '-Wl,--end-group']], 180 LIBPATH = ['$LIB_DIR'], 181 LINKCOM = [['$FLOCK_LINK', 182 '-o', 183 '$TARGET', 184 '$_LIBDIRFLAGS', 185 '$LINKFLAGS', 186 '$SOURCES', 187 '-Wl,--start-group', 188 '$_LIBFLAGS', 189 '-Wl,--end-group']], 190 SHLINKCOM = [['$FLOCK_SHLINK', 191 '-o', 192 '$TARGET', 193 '$_LIBDIRFLAGS', 194 '$SHLINKFLAGS', 195 '$SOURCES', 196 '-Wl,--start-group', 197 '$_LIBFLAGS', 198 '-Wl,--end-group']], 199 ), 200 'ImportExternal' : [ 201 'AS', 202 'CC', 203 'CXX', 204 'LINK', 205 ], 206 'PropagateExternal' : [ 207 'AS', 208 'CC', 209 'CCACHE_DIR', 210 'CXX', 211 'DISTCC_DIR', 212 'DISTCC_HOSTS', 213 'HOME', 214 'INCLUDE_SERVER_ARGS', 215 'INCLUDE_SERVER_PORT', 216 'LINK', 217 'CHROME_BUILD_TYPE', 218 'CHROMIUM_BUILD', 219 'OFFICIAL_BUILD', 220 ], 221 }, 222 } 223 224 config = configurations[env['CONFIG_NAME']] 225 env.Append(**config['Append']) 226 env.FilterOut(**config['FilterOut']) 227 env.Replace(**config['Replace']) 228 229 # Scons forces -fPIC for SHCCFLAGS on some platforms. 230 # Disable that so we can control it from cflags in gyp. 231 # Note that Scons itself is inconsistent with its -fPIC 232 # setting. SHCCFLAGS forces -fPIC, and SHCFLAGS does not. 233 # This will make SHCCFLAGS consistent with SHCFLAGS. 234 env['SHCCFLAGS'] = ['$CCFLAGS'] 235 236 for _var in config['ImportExternal']: 237 if _var in ARGUMENTS: 238 env[_var] = ARGUMENTS[_var] 239 elif _var in os.environ: 240 env[_var] = os.environ[_var] 241 for _var in config['PropagateExternal']: 242 if _var in ARGUMENTS: 243 env[_var] = ARGUMENTS[_var] 244 elif _var in os.environ: 245 env['ENV'][_var] = os.environ[_var] 246 247 env['ENV']['LD_LIBRARY_PATH'] = env.subst('$LIB_DIR') 248 249 if ARGUMENTS.get('COVERAGE') not in (None, '0'): 250 env.AppendUnique( 251 CCFLAGS = [ 252 '-fprofile-arcs', 253 '-ftest-coverage' 254 ], 255 LINKFLAGS = [ 256 '-fprofile-arcs' 257 ], 258 ) 259 260 if ARGUMENTS.get('PROFILE') not in (None, '0'): 261 env.AppendUnique( 262 CCFLAGS = [ 263 '-pg', 264 '-g' 265 ], 266 LINKFLAGS = [ 267 '-pg' 268 ], 269 ) 270 271 if ARGUMENTS.get('SYMBOLS') not in (None, '0'): 272 env.AppendUnique( 273 CCFLAGS = [ 274 '-g' 275 ], 276 ) 277 278 input_files = [ 279 '../build/build_config.h', 280 'crypto/rsa_private_key.h', 281 'crypto/rsa_private_key.cc', 282 'crypto/rsa_private_key_nss.cc', 283 'crypto/signature_creator.h', 284 'crypto/signature_creator_nss.cc', 285 'crypto/signature_verifier.h', 286 'crypto/signature_verifier_nss.cc', 287 'third_party/dmg_fp/dmg_fp.h', 288 'third_party/dmg_fp/dtoa.cc', 289 'third_party/dmg_fp/g_fmt.cc', 290 'third_party/icu/icu_utf.cc', 291 'third_party/icu/icu_utf.h', 292 'third_party/nspr/prcpucfg.h', 293 'third_party/nspr/prcpucfg_win.h', 294 'third_party/nspr/prtime.cc', 295 'third_party/nspr/prtime.h', 296 'third_party/nspr/prtypes.h', 297 'third_party/nss/blapi.h', 298 'third_party/nss/blapit.h', 299 'third_party/nss/sha256.h', 300 'third_party/nss/sha512.cc', 301 'third_party/purify/pure.h', 302 'third_party/xdg_mime/xdgmime.c', 303 'third_party/xdg_mime/xdgmime.h', 304 'third_party/xdg_mime/xdgmimealias.c', 305 'third_party/xdg_mime/xdgmimealias.h', 306 'third_party/xdg_mime/xdgmimecache.c', 307 'third_party/xdg_mime/xdgmimecache.h', 308 'third_party/xdg_mime/xdgmimeglob.c', 309 'third_party/xdg_mime/xdgmimeglob.h', 310 'third_party/xdg_mime/xdgmimeicon.c', 311 'third_party/xdg_mime/xdgmimeicon.h', 312 'third_party/xdg_mime/xdgmimeint.c', 313 'third_party/xdg_mime/xdgmimeint.h', 314 'third_party/xdg_mime/xdgmimemagic.c', 315 'third_party/xdg_mime/xdgmimemagic.h', 316 'third_party/xdg_mime/xdgmimeparent.c', 317 'third_party/xdg_mime/xdgmimeparent.h', 318 'atomicops_internals_x86_gcc.cc', 319 'at_exit.cc', 320 'at_exit.h', 321 'atomic_flag.h', 322 'atomic_flag.cc', 323 'atomic_ref_count.h', 324 'atomic_sequence_num.h', 325 'atomicops.h', 326 'atomicops_internals_x86_msvc.h', 327 'base_drag_source.h', 328 'base_drop_target.h', 329 'base_paths.cc', 330 'base_paths.h', 331 'base_paths_linux.h', 332 'base_paths_linux.cc', 333 'base_paths_mac.h', 334 'base_paths_win.h', 335 'base_switches.cc', 336 'base_switches.h', 337 'basictypes.h', 338 'bits.h', 339 'bzip2_error_handler.cc', 340 'chrome_application_mac.h', 341 'cocoa_protocols_mac.h', 342 'command_line.cc', 343 'command_line.h', 344 'compiler_specific.h', 345 'condition_variable.h', 346 'condition_variable_posix.cc', 347 'cpu.h', 348 'data_pack.cc', 349 'debug_on_start.h', 350 'debug_util.cc', 351 'debug_util.h', 352 'debug_util_posix.cc', 353 'directory_watcher.h', 354 'directory_watcher_inotify.cc', 355 'dynamic_annotations.h', 356 'dynamic_annotations.cc', 357 'event_recorder.h', 358 'event_recorder_stubs.cc', 359 'field_trial.cc', 360 'field_trial.h', 361 'file_descriptor_shuffle.cc', 362 'file_descriptor_shuffle.h', 363 'file_path.cc', 364 'file_path.h', 365 'file_util.cc', 366 'file_util.h', 367 'file_util_linux.cc', 368 'file_util_posix.cc', 369 'file_version_info.h', 370 'fix_wp64.h', 371 'float_util.h', 372 'foundation_utils_mac.h', 373 'gfx/point.cc', 374 'gfx/point.h', 375 'gfx/rect.cc', 376 'gfx/rect.h', 377 'gfx/size.cc', 378 'gfx/size.h', 379 'global_descriptors_posix.h', 380 'global_descriptors_posix.cc', 381 'hash_tables.h', 382 'histogram.cc', 383 'histogram.h', 384 'hmac.h', 385 'hmac_nss.cc', 386 'iat_patch.h', 387 'id_map.h', 388 'image_util.h', 389 'json/json_reader.cc', 390 'json/json_reader.h', 391 'json/json_writer.cc', 392 'json/json_writer.h', 393 'json/string_escape.cc', 394 'json/string_escape.h', 395 'keyboard_code_conversion_gtk.cc', 396 'keyboard_code_conversion_gtk.h', 397 'keyboard_codes.h', 398 'keyboard_codes_win.h', 399 'keyboard_codes_posix.h', 400 'lazy_instance.cc', 401 'lazy_instance.h', 402 'leak_annotations.h', 403 'leak_tracker.h', 404 'linked_list.h', 405 'linked_ptr.h', 406 'linux_util.cc', 407 'linux_util.h', 408 'lock.cc', 409 'lock.h', 410 'lock_impl.h', 411 'lock_impl_posix.cc', 412 'logging.cc', 413 'logging.h', 414 'mac_util.h', 415 'md5.cc', 416 'md5.h', 417 'memory_debug.cc', 418 'memory_debug.h', 419 'message_loop.cc', 420 'message_loop.h', 421 'message_pump.h', 422 'message_pump_default.cc', 423 'message_pump_default.h', 424 'message_pump_glib.cc', 425 'message_pump_glib.h', 426 'message_pump_libevent.cc', 427 'message_pump_libevent.h', 428 'message_pump_mac.h', 429 'message_pump_win.h', 430 'mime_util.h', 431 'mime_util_linux.cc', 432 'native_library.h', 433 'native_library_linux.cc', 434 'non_thread_safe.cc', 435 'non_thread_safe.h', 436 'nsimage_cache_mac.h', 437 'nss_init.cc', 438 'nss_init.h', 439 'nullable_string16.h', 440 'object_watcher.h', 441 'observer_list.h', 442 'observer_list_threadsafe.h', 443 'path_service.cc', 444 'path_service.h', 445 'pe_image.h', 446 'pickle.cc', 447 'pickle.h', 448 'platform_file.h', 449 'platform_file_posix.cc', 450 'platform_thread.h', 451 'platform_thread_posix.cc', 452 'port.h', 453 'profiler.cc', 454 'profiler.h', 455 'process.h', 456 'process_linux.cc', 457 'process_posix.cc', 458 'process_util.h', 459 'process_util_linux.cc', 460 'process_util_posix.cc', 461 'rand_util.cc', 462 'rand_util.h', 463 'rand_util_posix.cc', 464 'ref_counted.cc', 465 'ref_counted.h', 466 'ref_counted_memory.h', 467 'registry.h', 468 'resource_util.h', 469 'safe_strerror_posix.cc', 470 'safe_strerror_posix.h', 471 'scoped_bool.h', 472 'scoped_bstr_win.h', 473 'scoped_cftyperef.h', 474 'scoped_comptr_win.h', 475 'scoped_handle.h', 476 'scoped_handle_gtk.h', 477 'scoped_handle_win.h', 478 'scoped_nsautorelease_pool.h', 479 'scoped_nsdisable_screen_updates.h', 480 'scoped_nsobject.h', 481 'scoped_ptr.h', 482 'scoped_temp_dir.cc', 483 'scoped_temp_dir.h', 484 'scoped_variant_win.h', 485 'scoped_vector.h', 486 'setproctitle_linux.c', 487 'setproctitle_linux.h', 488 'sha1.cc', 489 'sha1.h', 490 'sha2.cc', 491 'sha2.h', 492 'shared_memory.h', 493 'shared_memory_posix.cc', 494 'simple_thread.cc', 495 'simple_thread.h', 496 'singleton.h', 497 'spin_wait.h', 498 'stack_container.h', 499 'stats_counters.h', 500 'stats_table.cc', 501 'stats_table.h', 502 'stl_util-inl.h', 503 'string16.cc', 504 'string16.h', 505 'string_piece.cc', 506 'string_piece.h', 507 'string_tokenizer.h', 508 'string_util.cc', 509 'string_util.h', 510 'string_util_win.h', 511 'sys_info.h', 512 'sys_info_posix.cc', 513 'sys_string_conversions.h', 514 'sys_string_conversions_linux.cc', 515 'system_monitor.cc', 516 'system_monitor.h', 517 'system_monitor_posix.cc', 518 'task.h', 519 'thread.cc', 520 'thread.h', 521 'thread_collision_warner.cc', 522 'thread_collision_warner.h', 523 'thread_local.h', 524 'thread_local_posix.cc', 525 'thread_local_storage.h', 526 'thread_local_storage_posix.cc', 527 'time.cc', 528 'time.h', 529 'time_posix.cc', 530 'timer.cc', 531 'timer.h', 532 'trace_event.cc', 533 'trace_event.h', 534 'tracked.cc', 535 'tracked.h', 536 'tracked_objects.cc', 537 'tracked_objects.h', 538 'tuple.h', 539 'utf_offset_string_conversions.cc', 540 'utf_offset_string_conversions.h', 541 'utf_string_conversion_utils.cc', 542 'utf_string_conversion_utils.h', 543 'utf_string_conversions.cc', 544 'utf_string_conversions.h', 545 'unix_domain_socket_posix.cc', 546 'values.cc', 547 'values.h', 548 'version.cc', 549 'version.h', 550 'waitable_event.h', 551 'waitable_event_posix.cc', 552 'waitable_event_watcher.h', 553 'waitable_event_watcher_posix.cc', 554 'watchdog.cc', 555 'watchdog.h', 556 'weak_ptr.h', 557 'win_util.h', 558 'windows_message_list.h', 559 'wmi_util.h', 560 'worker_pool.h', 561 'worker_pool_linux.cc', 562 'worker_pool_linux.h', 563 'worker_pool_mac.h', 564 ] 565 566 target_files = [] 567 prerequisites = [] 568 569 _result = [] 570 for infile in input_files: 571 if env.compilable(infile): 572 if (type(infile) == type('') 573 and (infile.startswith('$SRC_DIR/base/') 574 or not os.path.isabs(env.subst(infile)))): 575 # Force files below the build directory by replacing all '..' 576 # elements in the path with '__': 577 base, ext = os.path.splitext(os.path.normpath(infile)) 578 base = [d == '..' and '__' or d for d in base.split('/')] 579 base = os.path.join(*base) 580 object = '${OBJ_DIR}/${COMPONENT_NAME}/${TARGET_NAME}/' + base 581 if not infile.startswith('$SRC_DIR/base/'): 582 infile = '$SRC_DIR/base/' + infile 583 infile = env.StaticObject(object, infile)[0] 584 else: 585 infile = env.StaticObject(infile)[0] 586 _result.append(infile) 587 input_files = _result 588 589 _outputs = env.GypStaticLibrary('base', input_files) 590 target_files.extend(_outputs) 591 592 gyp_target = env.Alias('base', target_files) 593 dependencies = [ 594 Alias('lastchange'), 595 Alias('gtk'), 596 Alias('nss') 597 ] 598 env.Requires(target_files, dependencies) 599 env.Requires(gyp_target, dependencies) 600 for prerequisite in prerequisites: 601 env.Requires(prerequisite, dependencies) 602 env.Requires(gyp_target, prerequisites) 603 Return("gyp_target") 604