OLD | NEW |
1 # Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2011 The Chromium Authors. All rights reserved. |
2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 { | 5 { |
6 'variables': { | 6 'variables': { |
7 'variables': { | 7 'variables': { |
8 # Enable -Werror by default, but put it in a variable so it can | 8 # Enable -Werror by default, but put it in a variable so it can |
9 # be optionally disabled. | 9 # be optionally disabled. |
10 'werror%': '-Werror', | 10 'werror%': '-Werror', |
(...skipping 1318 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1329 '--defines=^(defines) >(_defines)', | 1329 '--defines=^(defines) >(_defines)', |
1330 '--link_flags=-m32 -B>(tc_lib_dir_glibc32) ^(link_flags) >(_l
ink_flags)', | 1330 '--link_flags=-m32 -B>(tc_lib_dir_glibc32) ^(link_flags) >(_l
ink_flags)', |
1331 '--source-list=^(source_list_glibc32)', | 1331 '--source-list=^(source_list_glibc32)', |
1332 ], | 1332 ], |
1333 }, | 1333 }, |
1334 ], | 1334 ], |
1335 }], | 1335 }], |
1336 ], # end target_conditions for glibc (nexe/nlib/nso, x86-32/64) | 1336 ], # end target_conditions for glibc (nexe/nlib/nso, x86-32/64) |
1337 }, | 1337 }, |
1338 }], # end target_arch == ia32 or x64 | 1338 }], # end target_arch == ia32 or x64 |
1339 ], | 1339 # Using an always true condition to match the evaluation order of the |
1340 'target_defaults': { | 1340 # non-pnacl stanzas. |
1341 'gcc_compile_flags': [], | 1341 # Gyp's evaluation order is deterministic, but undocumented. |
1342 'pnacl_compile_flags': [], | 1342 # Matching the level of nesting reduces the differences in how |
1343 'variables': { | 1343 # these stanzas get expanded. |
1344 'disable_pnacl%': 0, | 1344 # See: https://code.google.com/p/chromium/issues/detail?id=427427 |
1345 'build_pnacl_newlib': 0, | 1345 # 1==1 is used, as gyp's conditions do not have a boolean true value. |
1346 # Flag to translate pexes into nexes at build time (vs in the browser). | 1346 ['1==1', { |
1347 'translate_pexe_with_build': 0, | 1347 'target_defaults': { |
1348 # Flag to indicate that PNaCl should compile with the native ABI | 1348 'gcc_compile_flags': [], |
1349 # instead of the le32 ABI. | 1349 'pnacl_compile_flags': [], |
1350 'pnacl_native_biased': 0, | 1350 'variables': { |
1351 'nexe_target': '', | 1351 'disable_pnacl%': 0, |
1352 'nlib_target': '', | 1352 'build_pnacl_newlib': 0, |
1353 'extra_deps_pnacl_newlib': [], | 1353 # Flag to translate pexes into nexes at build time (vs in the |
1354 'tc_lib_dir_pnacl_newlib': '<(SHARED_INTERMEDIATE_DIR)/tc_pnacl_newlib/lib
', | 1354 # browser). |
1355 'tc_lib_dir_pnacl_translate' :'<(SHARED_INTERMEDIATE_DIR)/tc_pnacl_transla
te', | 1355 'translate_pexe_with_build': 0, |
1356 'tc_include_dir_pnacl_newlib': '<(SHARED_INTERMEDIATE_DIR)/tc_pnacl_newlib
/include', | 1356 # Flag to indicate that PNaCl should compile with the native ABI |
1357 'compile_flags': [ | 1357 # instead of the le32 ABI. |
1358 '<@(nacl_default_compile_flags)', | 1358 'pnacl_native_biased': 0, |
1359 ], | 1359 'nexe_target': '', |
1360 'gcc_compile_flags': [ | 1360 'nlib_target': '', |
1361 '-fomit-frame-pointer', | 1361 'extra_deps_pnacl_newlib': [], |
1362 # A debugger should be able to unwind IRT call frames. As the IRT is | 1362 'tc_lib_dir_pnacl_newlib': '<(SHARED_INTERMEDIATE_DIR)/tc_pnacl_newlib
/lib', |
1363 # compiled with high level of optimizations and without debug info, | 1363 'tc_lib_dir_pnacl_translate' :'<(SHARED_INTERMEDIATE_DIR)/tc_pnacl_tra
nslate', |
1364 # compiler is requested to generate unwind tables explicitly. This | 1364 'tc_include_dir_pnacl_newlib': '<(SHARED_INTERMEDIATE_DIR)/tc_pnacl_ne
wlib/include', |
1365 # is the default behavior on x86-64 and when compiling C++ with | 1365 'compile_flags': [ |
1366 # exceptions enabled, the change is for the benefit of x86-32 C. | 1366 '<@(nacl_default_compile_flags)', |
1367 # These are only required for the IRT but are here for all | 1367 ], |
1368 # nacl-gcc-compiled binaries because the IRT depends on other libs | 1368 'gcc_compile_flags': [ |
1369 '-fasynchronous-unwind-tables', | 1369 '-fomit-frame-pointer', |
1370 ], | 1370 # A debugger should be able to unwind IRT call frames. As the IRT is |
1371 'pnacl_compile_flags': [ | 1371 # compiled with high level of optimizations and without debug info, |
1372 '-Wno-extra-semi', | 1372 # compiler is requested to generate unwind tables explicitly. This |
1373 '-Wno-unused-private-field', | 1373 # is the default behavior on x86-64 and when compiling C++ with |
1374 '-Wno-char-subscripts', | 1374 # exceptions enabled, the change is for the benefit of x86-32 C. |
1375 '-Wno-unused-function', | 1375 # These are only required for the IRT but are here for all |
1376 ], | 1376 # nacl-gcc-compiled binaries because the IRT depends on other libs |
1377 # IRT compile/link flags to make the binary smaller. | 1377 '-fasynchronous-unwind-tables', |
1378 # Omitted from non-IRT libraries to keep the libraries themselves small. | 1378 ], |
1379 'gcc_irt_compile_flags': [ | 1379 'pnacl_compile_flags': [ |
1380 '-ffunction-sections', | 1380 '-Wno-extra-semi', |
1381 '-fdata-sections', | 1381 '-Wno-unused-private-field', |
1382 ], | 1382 '-Wno-char-subscripts', |
1383 'gcc_irt_link_flags': [ | 1383 '-Wno-unused-function', |
1384 '-Wl,--gc-sections', | 1384 ], |
1385 ], | 1385 # IRT compile/link flags to make the binary smaller. |
1386 'pnacl_irt_link_flags': [ | 1386 # Omitted from non-IRT libraries to keep the libraries themselves |
1387 '-Wt,-ffunction-sections', | 1387 # small. |
1388 '-Wt,-fdata-sections', | 1388 'gcc_irt_compile_flags': [ |
1389 '-Wn,--gc-sections', | 1389 '-ffunction-sections', |
1390 ], | 1390 '-fdata-sections', |
1391 }, | 1391 ], |
1392 'target_conditions': [ | 1392 'gcc_irt_link_flags': [ |
1393 # pnacl actions for building pexes and translating them | 1393 '-Wl,--gc-sections', |
1394 ['nexe_target!="" and disable_pnacl==0 and build_pnacl_newlib!=0 ' | 1394 ], |
1395 'and pnacl_native_biased==0', { | 1395 'pnacl_irt_link_flags': [ |
1396 'variables': { | 1396 '-Wt,-ffunction-sections', |
1397 'out_pnacl_newlib_x86_32_nexe%': '<(PRODUCT_DIR)/>(nexe_target)_pnacl
_newlib_x32.nexe', | 1397 '-Wt,-fdata-sections', |
1398 'out_pnacl_newlib_x86_64_nexe%': '<(PRODUCT_DIR)/>(nexe_target)_pnacl
_newlib_x64.nexe', | 1398 '-Wn,--gc-sections', |
1399 'out_pnacl_newlib_arm_nexe%': '<(PRODUCT_DIR)/>(nexe_target)_pnacl_ne
wlib_arm.nexe', | 1399 ], |
1400 'out_pnacl_newlib_mips_nexe%': '<(PRODUCT_DIR)/>(nexe_target)_pnacl_n
ewlib_mips32.nexe', | 1400 }, |
1401 'out_pnacl_newlib_x86_32_nonsfi_nexe%': '<(PRODUCT_DIR)/>(nexe_target
)_pnacl_newlib_x32_nonsfi.nexe', | 1401 'target_conditions': [ |
1402 'out_pnacl_newlib_arm_nonsfi_nexe%': '<(PRODUCT_DIR)/>(nexe_target)_p
nacl_newlib_arm_nonsfi.nexe', | 1402 # pnacl actions for building pexes and translating them |
1403 'tool_name': 'pnacl_newlib', | 1403 ['nexe_target!="" and disable_pnacl==0 and build_pnacl_newlib!=0 ' |
1404 'inst_dir': '<(SHARED_INTERMEDIATE_DIR)/tc_pnacl_newlib', | 1404 'and pnacl_native_biased==0', { |
1405 'out_pnacl_newlib%': '<(PRODUCT_DIR)/>(nexe_target)_newlib.pexe', | |
1406 'objdir_pnacl_newlib%': '>(INTERMEDIATE_DIR)/<(tool_name)/>(_target_n
ame)', | |
1407 'link_flags': [ | |
1408 '-O3', | |
1409 ], | |
1410 'translate_flags': [], | |
1411 }, | |
1412 'actions': [ | |
1413 { | |
1414 'action_name': 'build newlib pexe', | |
1415 'variables': { | 1405 'variables': { |
1416 'source_list_pnacl_newlib%': '^|(<(tool_name).>(_target_name).sou
rce_list.gypcmd ^(_sources) ^(sources))', | 1406 'out_pnacl_newlib_x86_32_nexe%': '<(PRODUCT_DIR)/>(nexe_target)_p
nacl_newlib_x32.nexe', |
1417 }, | 1407 'out_pnacl_newlib_x86_64_nexe%': '<(PRODUCT_DIR)/>(nexe_target)_p
nacl_newlib_x64.nexe', |
1418 'msvs_cygwin_shell': 0, | 1408 'out_pnacl_newlib_arm_nexe%': '<(PRODUCT_DIR)/>(nexe_target)_pnac
l_newlib_arm.nexe', |
1419 'description': 'building >(out_pnacl_newlib)', | 1409 'out_pnacl_newlib_mips_nexe%': '<(PRODUCT_DIR)/>(nexe_target)_pna
cl_newlib_mips32.nexe', |
1420 'inputs': [ | 1410 'out_pnacl_newlib_x86_32_nonsfi_nexe%': '<(PRODUCT_DIR)/>(nexe_ta
rget)_pnacl_newlib_x32_nonsfi.nexe', |
1421 '<@(common_inputs)', | 1411 'out_pnacl_newlib_arm_nonsfi_nexe%': '<(PRODUCT_DIR)/>(nexe_targe
t)_pnacl_newlib_arm_nonsfi.nexe', |
1422 '>!@pymod_do_main(scan_sources -I . >(include_dirs) >(_include_di
rs) -S >(sources) >(_sources))', | 1412 'tool_name': 'pnacl_newlib', |
1423 '>@(extra_deps)', | 1413 'inst_dir': '<(SHARED_INTERMEDIATE_DIR)/tc_pnacl_newlib', |
1424 '>@(extra_deps_pnacl_newlib)', | 1414 'out_pnacl_newlib%': '<(PRODUCT_DIR)/>(nexe_target)_newlib.pexe', |
1425 '^(source_list_pnacl_newlib)', | 1415 'objdir_pnacl_newlib%': '>(INTERMEDIATE_DIR)/<(tool_name)/>(_targ
et_name)', |
1426 '<(SHARED_INTERMEDIATE_DIR)/sdk/<(TOOLCHAIN_OS)_x86/pnacl_newlib/
stamp.prep', | 1416 'link_flags': [ |
1427 ], | 1417 '-O3', |
1428 'outputs': ['>(out_pnacl_newlib)'], | |
1429 'action': [ | |
1430 '<@(common_args)', | |
1431 '>@(extra_args)', | |
1432 '--arch', 'pnacl', | |
1433 '--build', 'newlib_pexe', | |
1434 '--name', '>(out_pnacl_newlib)', | |
1435 '--objdir', '>(objdir_pnacl_newlib)', | |
1436 '--include-dirs=>(tc_include_dir_pnacl_newlib) ^(include_dirs) >(
_include_dirs)', | |
1437 # TODO(dschuff): try removing gline-tables-only after 3.5 merge | |
1438 # when debug metadata is less memory-intensive | |
1439 '--compile_flags=^(compile_flags) >(_compile_flags) -gline-tables
-only ^(pnacl_compile_flags) >(_pnacl_compile_flags)', | |
1440 '--gomadir', '<(gomadir)', | |
1441 '--defines=^(defines) >(_defines)', | |
1442 '--link_flags=-B<(SHARED_INTERMEDIATE_DIR)/tc_pnacl_newlib/lib ^(
link_flags) >(_link_flags)', | |
1443 '--source-list=^(source_list_pnacl_newlib)', | |
1444 ], | |
1445 }], | |
1446 'target_conditions': [ | |
1447 [ 'enable_x86_32!=0 and translate_pexe_with_build!=0', { | |
1448 'actions': [{ | |
1449 'action_name': 'translate newlib pexe to x86-32 nexe', | |
1450 'msvs_cygwin_shell': 0, | |
1451 'description': 'translating >(out_pnacl_newlib_x86_32_nexe)', | |
1452 'inputs': [ | |
1453 # Depending on out_pnacl_newlib helps depend on common_inputs. | |
1454 '>(out_pnacl_newlib)', | |
1455 ], | 1418 ], |
1456 'outputs': [ '>(out_pnacl_newlib_x86_32_nexe)' ], | 1419 'translate_flags': [], |
1457 'action' : [ | |
1458 '<@(common_args)', | |
1459 '--arch', 'x86-32', | |
1460 '--build', 'newlib_translate', | |
1461 '--name', '>(out_pnacl_newlib_x86_32_nexe)', | |
1462 '--link_flags=^(translate_flags) >(translate_flags) -Wl,-L>(tc_
lib_dir_pnacl_translate)/lib-x86-32', | |
1463 '>(out_pnacl_newlib)', | |
1464 ], | |
1465 }], | |
1466 }], | |
1467 [ 'enable_x86_32_nonsfi!=0 and translate_pexe_with_build!=0', { | |
1468 'actions': [{ | |
1469 'action_name': 'translate newlib pexe to x86-32-nonsfi nexe', | |
1470 'msvs_cygwin_shell': 0, | |
1471 'description': 'translating >(out_pnacl_newlib_x86_32_nonsfi_nexe
)', | |
1472 'inputs': [ | |
1473 # Depending on out_pnacl_newlib helps depend on common_inputs. | |
1474 '>(out_pnacl_newlib)', | |
1475 ], | |
1476 'outputs': [ '>(out_pnacl_newlib_x86_32_nonsfi_nexe)' ], | |
1477 'action' : [ | |
1478 '<@(common_args)', | |
1479 '--arch', 'x86-32-nonsfi', | |
1480 '--build', 'newlib_translate', | |
1481 '--name', '>(out_pnacl_newlib_x86_32_nonsfi_nexe)', | |
1482 '--link_flags=^(translate_flags) >(translate_flags) -Wl,-L>(tc_
lib_dir_pnacl_translate)/lib-x86-32-nonsfi', | |
1483 '>(out_pnacl_newlib)', | |
1484 ], | |
1485 }], | |
1486 }], | |
1487 [ 'enable_x86_64!=0 and translate_pexe_with_build!=0', { | |
1488 'actions': [{ | |
1489 'action_name': 'translate newlib pexe to x86-64 nexe', | |
1490 'msvs_cygwin_shell': 0, | |
1491 'description': 'translating >(out_pnacl_newlib_x86_64_nexe)', | |
1492 'inputs': [ | |
1493 # Depending on out_pnacl_newlib helps depend on common_inputs. | |
1494 '>(out_pnacl_newlib)', | |
1495 ], | |
1496 'outputs': [ '>(out_pnacl_newlib_x86_64_nexe)' ], | |
1497 'action' : [ | |
1498 '<@(common_args)', | |
1499 '--arch', 'x86-64', | |
1500 '--build', 'newlib_translate', | |
1501 '--name', '>(out_pnacl_newlib_x86_64_nexe)', | |
1502 '--link_flags=^(translate_flags) >(translate_flags) -Wl,-L>(tc_
lib_dir_pnacl_translate)/lib-x86-64', | |
1503 '>(out_pnacl_newlib)', | |
1504 ], | |
1505 }], | |
1506 }], | |
1507 [ 'enable_arm!=0 and translate_pexe_with_build!=0', { | |
1508 'actions': [{ | |
1509 'action_name': 'translate newlib pexe to ARM nexe', | |
1510 'msvs_cygwin_shell': 0, | |
1511 'description': 'translating >(out_pnacl_newlib_arm_nexe)', | |
1512 'inputs': [ | |
1513 # Depending on out_pnacl_newlib helps depend on common_inputs. | |
1514 '>(out_pnacl_newlib)', | |
1515 ], | |
1516 'outputs': [ '>(out_pnacl_newlib_arm_nexe)' ], | |
1517 'action' : [ | |
1518 '<@(common_args)', | |
1519 '--arch', 'arm', | |
1520 '--build', 'newlib_translate', | |
1521 '--name', '>(out_pnacl_newlib_arm_nexe)', | |
1522 '--link_flags=^(translate_flags) >(translate_flags) -Wl,-L>(tc_
lib_dir_pnacl_translate)/lib-arm', | |
1523 '>(out_pnacl_newlib)', | |
1524 ], | |
1525 }], | |
1526 }], | |
1527 [ 'enable_arm_nonsfi!=0 and translate_pexe_with_build!=0', { | |
1528 'actions': [{ | |
1529 'action_name': 'translate newlib pexe to ARM-nonsfi nexe', | |
1530 'msvs_cygwin_shell': 0, | |
1531 'description': 'translating >(out_pnacl_newlib_arm_nonsfi_nexe)', | |
1532 'inputs': [ | |
1533 # Depending on out_pnacl_newlib helps depend on common_inputs. | |
1534 '>(out_pnacl_newlib)', | |
1535 ], | |
1536 'outputs': [ '>(out_pnacl_newlib_arm_nonsfi_nexe)' ], | |
1537 'action' : [ | |
1538 '<@(common_args)', | |
1539 '--arch', 'arm-nonsfi', | |
1540 '--build', 'newlib_translate', | |
1541 '--name', '>(out_pnacl_newlib_arm_nonsfi_nexe)', | |
1542 '--link_flags=^(translate_flags) >(translate_flags) -Wl,-L>(tc_
lib_dir_pnacl_translate)/lib-arm-nonsfi', | |
1543 '>(out_pnacl_newlib)', | |
1544 ], | |
1545 }], | |
1546 }], | |
1547 [ 'enable_mips!=0 and translate_pexe_with_build!=0', { | |
1548 'actions': [{ | |
1549 'action_name': 'translate newlib pexe to MIPS nexe', | |
1550 'msvs_cygwin_shell': 0, | |
1551 'description': 'translating >(out_pnacl_newlib_mips_nexe)', | |
1552 'inputs': [ | |
1553 # Depending on out_pnacl_newlib helps depend on common_inputs. | |
1554 '>(out_pnacl_newlib)', | |
1555 ], | |
1556 'outputs': [ '>(out_pnacl_newlib_mips_nexe)' ], | |
1557 'action' : [ | |
1558 '<@(common_args)', | |
1559 '--arch', 'mips', | |
1560 '--build', 'newlib_translate', | |
1561 '--name', '>(out_pnacl_newlib_mips_nexe)', | |
1562 '--link_flags=^(translate_flags) >(translate_flags) -Wl,-L>(tc_
lib_dir_pnacl_translate)/lib-mips32', | |
1563 '>(out_pnacl_newlib)', | |
1564 ], | |
1565 }], | |
1566 }], | |
1567 ], | |
1568 }], # end pnacl actions for building pexes and translating to nexes | |
1569 # pnacl action for building portable bitcode libraries | |
1570 ['nlib_target!="" and disable_pnacl==0 and build_pnacl_newlib!=0' | |
1571 'and pnacl_native_biased==0', { | |
1572 'variables': { | |
1573 'tool_name': 'pnacl_newlib', | |
1574 'objdir_pnacl_newlib%': '>(INTERMEDIATE_DIR)/<(tool_name)-pnacl/>(_ta
rget_name)', | |
1575 'out_pnacl_newlib%': '<(SHARED_INTERMEDIATE_DIR)/tc_<(tool_name)/lib/
>(nlib_target)', | |
1576 }, | |
1577 'actions': [ | |
1578 { | |
1579 'action_name': 'build newlib plib', | |
1580 'variables': { | |
1581 'source_list_pnacl_newlib%': '^|(<(tool_name).>(_target_name).sou
rce_list.gypcmd ^(_sources) ^(sources))', | |
1582 }, | |
1583 'msvs_cygwin_shell': 0, | |
1584 'description': 'building >(out_pnacl_newlib)', | |
1585 'inputs': [ | |
1586 '<@(common_inputs)', | |
1587 '>!@pymod_do_main(scan_sources -I . >(include_dirs) >(_include_di
rs) -S >(sources) >(_sources))', | |
1588 '>@(extra_deps)', | |
1589 '>@(extra_deps_pnacl_newlib)', | |
1590 '^(source_list_pnacl_newlib)', | |
1591 '<(SHARED_INTERMEDIATE_DIR)/sdk/<(TOOLCHAIN_OS)_x86/pnacl_newlib/
stamp.prep', | |
1592 ], | |
1593 'outputs': ['>(out_pnacl_newlib)'], | |
1594 'action': [ | |
1595 '<@(common_args)', | |
1596 '>@(extra_args)', | |
1597 '--arch', 'pnacl', | |
1598 '--build', 'newlib_plib', | |
1599 '--name', '>(out_pnacl_newlib)', | |
1600 '--objdir', '>(objdir_pnacl_newlib)', | |
1601 '--include-dirs=>(tc_include_dir_pnacl_newlib) ^(include_dirs) >(
_include_dirs)', | |
1602 # TODO(dschuff): try removing gline-tables-only after 3.5 merge | |
1603 # when debug metadata is less memory-intensive | |
1604 '--compile_flags=^(compile_flags) >(_compile_flags) -gline-tables
-only ^(pnacl_compile_flags) >(_pnacl_compile_flags)', | |
1605 '--gomadir', '<(gomadir)', | |
1606 '--defines=^(defines) >(_defines)', | |
1607 '--link_flags=-B>(tc_lib_dir_pnacl_newlib) ^(link_flags) >(_link_
flags)', | |
1608 '--source-list=^(source_list_pnacl_newlib)', | |
1609 ], | |
1610 }, | |
1611 ], | |
1612 }], # end pnacl actions for bitcode libraries | |
1613 ], # end target conditions for pnacl pexe/plib | |
1614 # pnacl actions for building ABI-biased native libraries | |
1615 'conditions': [ | |
1616 # ARM | |
1617 ['target_arch=="arm"', { | |
1618 'target_conditions': [ | |
1619 ['disable_pnacl==0 and pnacl_native_biased==1 and nlib_target!="" and
build_pnacl_newlib!=0', { | |
1620 'variables': { | |
1621 'tool_name': 'pnacl_newlib_arm', | |
1622 'out_pnacl_newlib_arm%': '<(SHARED_INTERMEDIATE_DIR)/tc_<(tool_na
me)/libarm/>(nlib_target)', | |
1623 'objdir_pnacl_newlib_arm%': '>(INTERMEDIATE_DIR)/<(tool_name)/>(_
target_name)', | |
1624 }, | |
1625 'actions': [ | |
1626 { | |
1627 'action_name': 'build newlib arm nlib (via pnacl)', | |
1628 'variables': { | |
1629 'source_list_pnacl_newlib_arm%': '^|(<(tool_name).>(_target_na
me).source_list.gypcmd ^(_sources) ^(sources))', | |
1630 }, | |
1631 'msvs_cygwin_shell': 0, | |
1632 'description': 'building >(out_pnacl_newlib_arm)', | |
1633 'inputs': [ | |
1634 '<@(common_inputs)', | |
1635 '>!@pymod_do_main(scan_sources -I . >(include_dirs) >(_include
_dirs) -S >(sources) >(_sources))', | |
1636 '>@(extra_deps)', | |
1637 '>@(extra_deps_pnacl_newlib)', | |
1638 '^(source_list_pnacl_newlib_arm)', | |
1639 '<(SHARED_INTERMEDIATE_DIR)/sdk/<(TOOLCHAIN_OS)_x86/pnacl_newl
ib/stamp.prep' | |
1640 ], | |
1641 'outputs': ['>(out_pnacl_newlib_arm)'], | |
1642 'action': [ | |
1643 '<@(common_args)', | |
1644 '>@(extra_args)', | |
1645 '--arch', 'arm', | |
1646 '--build', 'newlib_nlib_pnacl', | |
1647 '--name', '>(out_pnacl_newlib_arm)', | |
1648 '--objdir', '>(objdir_pnacl_newlib_arm)', | |
1649 '--include-dirs=>(tc_include_dir_pnacl_newlib) ^(include_dirs)
>(_include_dirs)', | |
1650 '--compile_flags=--target=armv7-unknown-nacl-gnueabi -mfloat-a
bi=hard --pnacl-allow-translate -arch arm ^(compile_flags) >(_compile_flags) ^(p
nacl_compile_flags) >(_pnacl_compile_flags)', | |
1651 '--gomadir', '<(gomadir)', | |
1652 '--defines=^(defines) >(_defines)', | |
1653 '--link_flags=-B>(tc_lib_dir_pnacl_newlib) ^(link_flags) >(_li
nk_flags)', | |
1654 '--source-list=^(source_list_pnacl_newlib_arm)', | |
1655 ], | |
1656 }, | |
1657 ], | |
1658 }], | |
1659 ], | |
1660 }], # end ARM | |
1661 # ia32 or x64 (want to build both for Windows) | |
1662 ['target_arch=="ia32" or target_arch=="x64"', { | |
1663 'target_conditions': [ | |
1664 # x64 | |
1665 ['enable_x86_64!=0 and disable_pnacl==0 and pnacl_native_biased==1 ' | |
1666 'and nlib_target!="" and build_pnacl_newlib!=0', { | |
1667 'variables': { | |
1668 'tool_name': 'pnacl_newlib_x86_64', | |
1669 'out_pnacl_newlib_x86_64%': '<(SHARED_INTERMEDIATE_DIR)/tc_<(tool
_name)/lib-x86-64/>(nlib_target)', | |
1670 'objdir_pnacl_newlib_x86_64%': '>(INTERMEDIATE_DIR)/<(tool_name)/
>(_target_name)', | |
1671 }, | 1420 }, |
1672 'actions': [ | 1421 'actions': [ |
1673 { | 1422 { |
1674 'action_name': 'build newlib x86-64 nlib (via pnacl)', | 1423 'action_name': 'build newlib pexe', |
1675 'variables': { | 1424 'variables': { |
1676 'source_list_pnacl_newlib_x86_64%': '^|(<(tool_name).>(_targe
t_name).source_list.gypcmd ^(_sources) ^(sources))', | 1425 'source_list_pnacl_newlib%': '^|(<(tool_name).>(_target_name)
.source_list.gypcmd ^(_sources) ^(sources))', |
1677 }, | 1426 }, |
1678 'msvs_cygwin_shell': 0, | 1427 'msvs_cygwin_shell': 0, |
1679 'description': 'building >(out_pnacl_newlib_x86_64)', | 1428 'description': 'building >(out_pnacl_newlib)', |
1680 'inputs': [ | 1429 'inputs': [ |
1681 '<@(common_inputs)', | 1430 '<@(common_inputs)', |
1682 '>!@pymod_do_main(scan_sources -I . >(include_dirs) >(_includ
e_dirs) -S >(sources) >(_sources))', | 1431 '>!@pymod_do_main(scan_sources -I . >(include_dirs) >(_includ
e_dirs) -S >(sources) >(_sources))', |
1683 '>@(extra_deps)', | 1432 '>@(extra_deps)', |
1684 '>@(extra_deps_pnacl_newlib)', | 1433 '>@(extra_deps_pnacl_newlib)', |
1685 '^(source_list_pnacl_newlib_x86_64)', | 1434 '^(source_list_pnacl_newlib)', |
1686 '<(SHARED_INTERMEDIATE_DIR)/sdk/<(TOOLCHAIN_OS)_x86/pnacl_new
lib/stamp.prep' | 1435 '<(SHARED_INTERMEDIATE_DIR)/sdk/<(TOOLCHAIN_OS)_x86/pnacl_new
lib/stamp.prep', |
1687 ], | 1436 ], |
1688 'outputs': ['>(out_pnacl_newlib_x86_64)'], | 1437 'outputs': ['>(out_pnacl_newlib)'], |
1689 'action': [ | 1438 'action': [ |
1690 '<@(common_args)', | 1439 '<@(common_args)', |
1691 '>@(extra_args)', | 1440 '>@(extra_args)', |
1692 '--arch', 'x86-64', | 1441 '--arch', 'pnacl', |
1693 '--build', 'newlib_nlib_pnacl', | 1442 '--build', 'newlib_pexe', |
1694 '--name', '>(out_pnacl_newlib_x86_64)', | 1443 '--name', '>(out_pnacl_newlib)', |
1695 '--objdir', '>(objdir_pnacl_newlib_x86_64)', | 1444 '--objdir', '>(objdir_pnacl_newlib)', |
1696 '--include-dirs=>(tc_include_dir_pnacl_newlib) ^(include_dirs
) >(_include_dirs)', | 1445 '--include-dirs=>(tc_include_dir_pnacl_newlib) ^(include_dirs
) >(_include_dirs)', |
1697 '--compile_flags=--target=x86_64-unknown-nacl --pnacl-allow-t
ranslate -arch x86-64 ^(compile_flags) >(_compile_flags) ^(pnacl_compile_flags)
>(_pnacl_compile_flags)', | 1446 # TODO(dschuff): try removing gline-tables-only after 3.5 |
| 1447 # merge when debug metadata is less memory-intensive |
| 1448 '--compile_flags=^(compile_flags) >(_compile_flags) -gline-ta
bles-only ^(pnacl_compile_flags) >(_pnacl_compile_flags)', |
1698 '--gomadir', '<(gomadir)', | 1449 '--gomadir', '<(gomadir)', |
1699 '--defines=^(defines) >(_defines)', | 1450 '--defines=^(defines) >(_defines)', |
1700 '--link_flags=-B>(tc_lib_dir_pnacl_newlib) ^(link_flags) >(_l
ink_flags)', | 1451 '--link_flags=-B<(SHARED_INTERMEDIATE_DIR)/tc_pnacl_newlib/li
b ^(link_flags) >(_link_flags)', |
1701 '--source-list=^(source_list_pnacl_newlib_x86_64)', | 1452 '--source-list=^(source_list_pnacl_newlib)', |
1702 ], | 1453 ], |
1703 }, | 1454 }], |
| 1455 'target_conditions': [ |
| 1456 [ 'enable_x86_32!=0 and translate_pexe_with_build!=0', { |
| 1457 'actions': [{ |
| 1458 'action_name': 'translate newlib pexe to x86-32 nexe', |
| 1459 'msvs_cygwin_shell': 0, |
| 1460 'description': 'translating >(out_pnacl_newlib_x86_32_nexe)', |
| 1461 'inputs': [ |
| 1462 # Depending on out_pnacl_newlib helps depend on |
| 1463 # common_inputs. |
| 1464 '>(out_pnacl_newlib)', |
| 1465 ], |
| 1466 'outputs': [ '>(out_pnacl_newlib_x86_32_nexe)' ], |
| 1467 'action' : [ |
| 1468 '<@(common_args)', |
| 1469 '--arch', 'x86-32', |
| 1470 '--build', 'newlib_translate', |
| 1471 '--name', '>(out_pnacl_newlib_x86_32_nexe)', |
| 1472 '--link_flags=^(translate_flags) >(translate_flags) -Wl,-L>
(tc_lib_dir_pnacl_translate)/lib-x86-32', |
| 1473 '>(out_pnacl_newlib)', |
| 1474 ], |
| 1475 }], |
| 1476 }], |
| 1477 [ 'enable_x86_32_nonsfi!=0 and translate_pexe_with_build!=0', { |
| 1478 'actions': [{ |
| 1479 'action_name': 'translate newlib pexe to x86-32-nonsfi nexe', |
| 1480 'msvs_cygwin_shell': 0, |
| 1481 'description': 'translating >(out_pnacl_newlib_x86_32_nonsfi_
nexe)', |
| 1482 'inputs': [ |
| 1483 # Depending on out_pnacl_newlib helps depend on |
| 1484 # common_inputs. |
| 1485 '>(out_pnacl_newlib)', |
| 1486 ], |
| 1487 'outputs': [ '>(out_pnacl_newlib_x86_32_nonsfi_nexe)' ], |
| 1488 'action' : [ |
| 1489 '<@(common_args)', |
| 1490 '--arch', 'x86-32-nonsfi', |
| 1491 '--build', 'newlib_translate', |
| 1492 '--name', '>(out_pnacl_newlib_x86_32_nonsfi_nexe)', |
| 1493 '--link_flags=^(translate_flags) >(translate_flags) -Wl,-L>
(tc_lib_dir_pnacl_translate)/lib-x86-32-nonsfi', |
| 1494 '>(out_pnacl_newlib)', |
| 1495 ], |
| 1496 }], |
| 1497 }], |
| 1498 [ 'enable_x86_64!=0 and translate_pexe_with_build!=0', { |
| 1499 'actions': [{ |
| 1500 'action_name': 'translate newlib pexe to x86-64 nexe', |
| 1501 'msvs_cygwin_shell': 0, |
| 1502 'description': 'translating >(out_pnacl_newlib_x86_64_nexe)', |
| 1503 'inputs': [ |
| 1504 # Depending on out_pnacl_newlib helps depend on |
| 1505 # common_inputs. |
| 1506 '>(out_pnacl_newlib)', |
| 1507 ], |
| 1508 'outputs': [ '>(out_pnacl_newlib_x86_64_nexe)' ], |
| 1509 'action' : [ |
| 1510 '<@(common_args)', |
| 1511 '--arch', 'x86-64', |
| 1512 '--build', 'newlib_translate', |
| 1513 '--name', '>(out_pnacl_newlib_x86_64_nexe)', |
| 1514 '--link_flags=^(translate_flags) >(translate_flags) -Wl,-L>
(tc_lib_dir_pnacl_translate)/lib-x86-64', |
| 1515 '>(out_pnacl_newlib)', |
| 1516 ], |
| 1517 }], |
| 1518 }], |
| 1519 [ 'enable_arm!=0 and translate_pexe_with_build!=0', { |
| 1520 'actions': [{ |
| 1521 'action_name': 'translate newlib pexe to ARM nexe', |
| 1522 'msvs_cygwin_shell': 0, |
| 1523 'description': 'translating >(out_pnacl_newlib_arm_nexe)', |
| 1524 'inputs': [ |
| 1525 # Depending on out_pnacl_newlib helps depend on |
| 1526 # common_inputs. |
| 1527 '>(out_pnacl_newlib)', |
| 1528 ], |
| 1529 'outputs': [ '>(out_pnacl_newlib_arm_nexe)' ], |
| 1530 'action' : [ |
| 1531 '<@(common_args)', |
| 1532 '--arch', 'arm', |
| 1533 '--build', 'newlib_translate', |
| 1534 '--name', '>(out_pnacl_newlib_arm_nexe)', |
| 1535 '--link_flags=^(translate_flags) >(translate_flags) -Wl,-L>
(tc_lib_dir_pnacl_translate)/lib-arm', |
| 1536 '>(out_pnacl_newlib)', |
| 1537 ], |
| 1538 }], |
| 1539 }], |
| 1540 [ 'enable_arm_nonsfi!=0 and translate_pexe_with_build!=0', { |
| 1541 'actions': [{ |
| 1542 'action_name': 'translate newlib pexe to ARM-nonsfi nexe', |
| 1543 'msvs_cygwin_shell': 0, |
| 1544 'description': 'translating >(out_pnacl_newlib_arm_nonsfi_nex
e)', |
| 1545 'inputs': [ |
| 1546 # Depending on out_pnacl_newlib helps depend on |
| 1547 # common_inputs. |
| 1548 '>(out_pnacl_newlib)', |
| 1549 ], |
| 1550 'outputs': [ '>(out_pnacl_newlib_arm_nonsfi_nexe)' ], |
| 1551 'action' : [ |
| 1552 '<@(common_args)', |
| 1553 '--arch', 'arm-nonsfi', |
| 1554 '--build', 'newlib_translate', |
| 1555 '--name', '>(out_pnacl_newlib_arm_nonsfi_nexe)', |
| 1556 '--link_flags=^(translate_flags) >(translate_flags) -Wl,-L>
(tc_lib_dir_pnacl_translate)/lib-arm-nonsfi', |
| 1557 '>(out_pnacl_newlib)', |
| 1558 ], |
| 1559 }], |
| 1560 }], |
| 1561 [ 'enable_mips!=0 and translate_pexe_with_build!=0', { |
| 1562 'actions': [{ |
| 1563 'action_name': 'translate newlib pexe to MIPS nexe', |
| 1564 'msvs_cygwin_shell': 0, |
| 1565 'description': 'translating >(out_pnacl_newlib_mips_nexe)', |
| 1566 'inputs': [ |
| 1567 # Depending on out_pnacl_newlib helps depend on |
| 1568 # common_inputs. |
| 1569 '>(out_pnacl_newlib)', |
| 1570 ], |
| 1571 'outputs': [ '>(out_pnacl_newlib_mips_nexe)' ], |
| 1572 'action' : [ |
| 1573 '<@(common_args)', |
| 1574 '--arch', 'mips', |
| 1575 '--build', 'newlib_translate', |
| 1576 '--name', '>(out_pnacl_newlib_mips_nexe)', |
| 1577 '--link_flags=^(translate_flags) >(translate_flags) -Wl,-L>
(tc_lib_dir_pnacl_translate)/lib-mips32', |
| 1578 '>(out_pnacl_newlib)', |
| 1579 ], |
| 1580 }], |
| 1581 }], |
1704 ], | 1582 ], |
1705 }], # end x64 | 1583 }], # end pnacl actions for building pexes and translating to nexes |
1706 # ia32 | 1584 # pnacl action for building portable bitcode libraries |
1707 ['enable_x86_32!=0 and disable_pnacl==0 and pnacl_native_biased==1 ' | 1585 ['nlib_target!="" and disable_pnacl==0 and build_pnacl_newlib!=0' |
1708 'and nlib_target!="" and build_pnacl_newlib!=0', { | 1586 'and pnacl_native_biased==0', { |
1709 'variables': { | 1587 'variables': { |
1710 'tool_name': 'pnacl_newlib_x86_32', | 1588 'tool_name': 'pnacl_newlib', |
1711 'out_pnacl_newlib_x86_32%': '<(SHARED_INTERMEDIATE_DIR)/tc_<(tool
_name)/lib-x86-32/>(nlib_target)', | 1589 'objdir_pnacl_newlib%': '>(INTERMEDIATE_DIR)/<(tool_name)-pnacl/>
(_target_name)', |
1712 'objdir_pnacl_newlib_x86_32%': '>(INTERMEDIATE_DIR)/<(tool_name)/
>(_target_name)', | 1590 'out_pnacl_newlib%': '<(SHARED_INTERMEDIATE_DIR)/tc_<(tool_name)/
lib/>(nlib_target)', |
1713 }, | 1591 }, |
1714 'actions': [ | 1592 'actions': [ |
1715 { | 1593 { |
1716 'action_name': 'build newlib x86-32 nlib (via pnacl)', | 1594 'action_name': 'build newlib plib', |
1717 'variables': { | 1595 'variables': { |
1718 'source_list_pnacl_newlib_x86_32%': '^|(<(tool_name).>(_targe
t_name).source_list.gypcmd ^(_sources) ^(sources))', | 1596 'source_list_pnacl_newlib%': '^|(<(tool_name).>(_target_name)
.source_list.gypcmd ^(_sources) ^(sources))', |
1719 }, | 1597 }, |
1720 'msvs_cygwin_shell': 0, | 1598 'msvs_cygwin_shell': 0, |
1721 'description': 'building >(out_pnacl_newlib_x86_32)', | 1599 'description': 'building >(out_pnacl_newlib)', |
1722 'inputs': [ | 1600 'inputs': [ |
1723 '<@(common_inputs)', | 1601 '<@(common_inputs)', |
1724 '>!@pymod_do_main(scan_sources -I . >(include_dirs) >(_includ
e_dirs) -S >(sources) >(_sources))', | 1602 '>!@pymod_do_main(scan_sources -I . >(include_dirs) >(_includ
e_dirs) -S >(sources) >(_sources))', |
1725 '>@(extra_deps)', | 1603 '>@(extra_deps)', |
1726 '>@(extra_deps_pnacl_newlib)', | 1604 '>@(extra_deps_pnacl_newlib)', |
1727 '^(source_list_pnacl_newlib_x86_32)', | 1605 '^(source_list_pnacl_newlib)', |
1728 '<(SHARED_INTERMEDIATE_DIR)/sdk/<(TOOLCHAIN_OS)_x86/pnacl_new
lib/stamp.prep' | 1606 '<(SHARED_INTERMEDIATE_DIR)/sdk/<(TOOLCHAIN_OS)_x86/pnacl_new
lib/stamp.prep', |
1729 ], | 1607 ], |
1730 'outputs': ['>(out_pnacl_newlib_x86_32)'], | 1608 'outputs': ['>(out_pnacl_newlib)'], |
1731 'action': [ | 1609 'action': [ |
1732 '<@(common_args)', | 1610 '<@(common_args)', |
1733 '>@(extra_args)', | 1611 '>@(extra_args)', |
1734 '--arch', 'x86-32', | 1612 '--arch', 'pnacl', |
1735 '--build', 'newlib_nlib_pnacl', | 1613 '--build', 'newlib_plib', |
1736 '--name', '>(out_pnacl_newlib_x86_32)', | 1614 '--name', '>(out_pnacl_newlib)', |
1737 '--objdir', '>(objdir_pnacl_newlib_x86_32)', | 1615 '--objdir', '>(objdir_pnacl_newlib)', |
1738 '--include-dirs=>(tc_include_dir_pnacl_newlib) ^(include_dirs
) >(_include_dirs)', | 1616 '--include-dirs=>(tc_include_dir_pnacl_newlib) ^(include_dirs
) >(_include_dirs)', |
1739 '--compile_flags=--target=i686-unknown-nacl --pnacl-allow-tra
nslate -arch x86-32 ^(compile_flags) >(_compile_flags) ^(pnacl_compile_flags) >(
_pnacl_compile_flags)', | 1617 # TODO(dschuff): try removing gline-tables-only after 3.5 |
| 1618 # merge when debug metadata is less memory-intensive |
| 1619 '--compile_flags=^(compile_flags) >(_compile_flags) -gline-ta
bles-only ^(pnacl_compile_flags) >(_pnacl_compile_flags)', |
1740 '--gomadir', '<(gomadir)', | 1620 '--gomadir', '<(gomadir)', |
1741 '--defines=^(defines) >(_defines)', | 1621 '--defines=^(defines) >(_defines)', |
1742 '--link_flags=-B>(tc_lib_dir_pnacl_newlib) ^(link_flags) >(_l
ink_flags)', | 1622 '--link_flags=-B>(tc_lib_dir_pnacl_newlib) ^(link_flags) >(_l
ink_flags)', |
1743 '--source-list=^(source_list_pnacl_newlib_x86_32)', | 1623 '--source-list=^(source_list_pnacl_newlib)', |
1744 ], | 1624 ], |
1745 }, | 1625 }, |
1746 ], | 1626 ], |
1747 }], # end ia32 | 1627 }], # end pnacl actions for bitcode libraries |
1748 ], # end ia32 or x64 | 1628 ], # end target conditions for pnacl pexe/plib |
1749 }], | 1629 # pnacl actions for building ABI-biased native libraries |
1750 # MIPS | 1630 'conditions': [ |
1751 # The shim is not biased since the IRT itself is not biased. | 1631 # ARM |
1752 ['target_arch=="mipsel"', { | 1632 ['target_arch=="arm"', { |
1753 'target_conditions': [ | 1633 'target_conditions': [ |
1754 ['disable_pnacl==0 and pnacl_native_biased==1 and nlib_target!="" and
build_pnacl_newlib!=0', { | 1634 ['disable_pnacl==0 and pnacl_native_biased==1 and nlib_target!=""
and build_pnacl_newlib!=0', { |
1755 'variables': { | |
1756 'tool_name': 'pnacl_newlib_mips', | |
1757 'out_pnacl_newlib_mips%': '<(SHARED_INTERMEDIATE_DIR)/tc_<(tool_n
ame)/libmips/>(nlib_target)', | |
1758 'objdir_pnacl_newlib_mips%': '>(INTERMEDIATE_DIR)/<(tool_name)/>(
_target_name)', | |
1759 }, | |
1760 'actions': [ | |
1761 { | |
1762 'action_name': 'build newlib mips nlib (via pnacl)', | |
1763 'variables': { | 1635 'variables': { |
1764 'source_list_pnacl_newlib_mips%': '^|(<(tool_name).>(_target_n
ame).source_list.gypcmd ^(_sources) ^(sources))', | 1636 'tool_name': 'pnacl_newlib_arm', |
1765 }, | 1637 'out_pnacl_newlib_arm%': '<(SHARED_INTERMEDIATE_DIR)/tc_<(too
l_name)/libarm/>(nlib_target)', |
1766 'msvs_cygwin_shell': 0, | 1638 'objdir_pnacl_newlib_arm%': '>(INTERMEDIATE_DIR)/<(tool_name)
/>(_target_name)', |
1767 'description': 'building >(out_pnacl_newlib_mips)', | 1639 }, |
1768 'inputs': [ | 1640 'actions': [ |
1769 '<@(common_inputs)', | 1641 { |
1770 '>!@pymod_do_main(scan_sources -I . >(include_dirs) >(_include
_dirs) -S >(sources) >(_sources))', | 1642 'action_name': 'build newlib arm nlib (via pnacl)', |
1771 '>@(extra_deps)', | 1643 'variables': { |
1772 '>@(extra_deps_pnacl_newlib)', | 1644 'source_list_pnacl_newlib_arm%': '^|(<(tool_name).>(_targe
t_name).source_list.gypcmd ^(_sources) ^(sources))', |
1773 '^(source_list_pnacl_newlib_mips)', | 1645 }, |
1774 '<(SHARED_INTERMEDIATE_DIR)/sdk/<(TOOLCHAIN_OS)_x86/pnacl_newl
ib/stamp.prep' | 1646 'msvs_cygwin_shell': 0, |
| 1647 'description': 'building >(out_pnacl_newlib_arm)', |
| 1648 'inputs': [ |
| 1649 '<@(common_inputs)', |
| 1650 '>!@pymod_do_main(scan_sources -I . >(include_dirs) >(_inc
lude_dirs) -S >(sources) >(_sources))', |
| 1651 '>@(extra_deps)', |
| 1652 '>@(extra_deps_pnacl_newlib)', |
| 1653 '^(source_list_pnacl_newlib_arm)', |
| 1654 '<(SHARED_INTERMEDIATE_DIR)/sdk/<(TOOLCHAIN_OS)_x86/pnacl_
newlib/stamp.prep' |
| 1655 ], |
| 1656 'outputs': ['>(out_pnacl_newlib_arm)'], |
| 1657 'action': [ |
| 1658 '<@(common_args)', |
| 1659 '>@(extra_args)', |
| 1660 '--arch', 'arm', |
| 1661 '--build', 'newlib_nlib_pnacl', |
| 1662 '--name', '>(out_pnacl_newlib_arm)', |
| 1663 '--objdir', '>(objdir_pnacl_newlib_arm)', |
| 1664 '--include-dirs=>(tc_include_dir_pnacl_newlib) ^(include_d
irs) >(_include_dirs)', |
| 1665 '--compile_flags=--target=armv7-unknown-nacl-gnueabi -mflo
at-abi=hard --pnacl-allow-translate -arch arm ^(compile_flags) >(_compile_flags)
^(pnacl_compile_flags) >(_pnacl_compile_flags)', |
| 1666 '--gomadir', '<(gomadir)', |
| 1667 '--defines=^(defines) >(_defines)', |
| 1668 '--link_flags=-B>(tc_lib_dir_pnacl_newlib) ^(link_flags) >
(_link_flags)', |
| 1669 '--source-list=^(source_list_pnacl_newlib_arm)', |
| 1670 ], |
| 1671 }, |
1775 ], | 1672 ], |
1776 'outputs': ['>(out_pnacl_newlib_mips)'], | 1673 }], |
1777 'action': [ | 1674 ], |
1778 '<@(common_args)', | 1675 }], # end ARM |
1779 '>@(extra_args)', | 1676 # ia32 or x64 (want to build both for Windows) |
1780 '--arch', 'mips', | 1677 ['target_arch=="ia32" or target_arch=="x64"', { |
1781 '--build', 'newlib_nlib_pnacl', | 1678 'target_conditions': [ |
1782 '--name', '>(out_pnacl_newlib_mips)', | 1679 # x64 |
1783 '--objdir', '>(objdir_pnacl_newlib_mips)', | 1680 ['enable_x86_64!=0 and disable_pnacl==0 and pnacl_native_biased==1
' |
1784 '--include-dirs=>(tc_include_dir_pnacl_newlib) ^(include_dirs)
>(_include_dirs)', | 1681 'and nlib_target!="" and build_pnacl_newlib!=0', { |
1785 '--compile_flags=--pnacl-allow-translate -arch mips ^(compile_
flags) >(_compile_flags) ^(pnacl_compile_flags) >(_pnacl_compile_flags)', | 1682 'variables': { |
1786 '--gomadir', '<(gomadir)', | 1683 'tool_name': 'pnacl_newlib_x86_64', |
1787 '--defines=^(defines) >(_defines)', | 1684 'out_pnacl_newlib_x86_64%': '<(SHARED_INTERMEDIATE_DIR)/tc_<(
tool_name)/lib-x86-64/>(nlib_target)', |
1788 '--link_flags=-B>(tc_lib_dir_pnacl_newlib) ^(link_flags) >(_li
nk_flags)', | 1685 'objdir_pnacl_newlib_x86_64%': '>(INTERMEDIATE_DIR)/<(tool_na
me)/>(_target_name)', |
1789 '--source-list=^(source_list_pnacl_newlib_mips)', | 1686 }, |
| 1687 'actions': [ |
| 1688 { |
| 1689 'action_name': 'build newlib x86-64 nlib (via pnacl)', |
| 1690 'variables': { |
| 1691 'source_list_pnacl_newlib_x86_64%': '^|(<(tool_name).>(_t
arget_name).source_list.gypcmd ^(_sources) ^(sources))', |
| 1692 }, |
| 1693 'msvs_cygwin_shell': 0, |
| 1694 'description': 'building >(out_pnacl_newlib_x86_64)', |
| 1695 'inputs': [ |
| 1696 '<@(common_inputs)', |
| 1697 '>!@pymod_do_main(scan_sources -I . >(include_dirs) >(_in
clude_dirs) -S >(sources) >(_sources))', |
| 1698 '>@(extra_deps)', |
| 1699 '>@(extra_deps_pnacl_newlib)', |
| 1700 '^(source_list_pnacl_newlib_x86_64)', |
| 1701 '<(SHARED_INTERMEDIATE_DIR)/sdk/<(TOOLCHAIN_OS)_x86/pnacl
_newlib/stamp.prep' |
| 1702 ], |
| 1703 'outputs': ['>(out_pnacl_newlib_x86_64)'], |
| 1704 'action': [ |
| 1705 '<@(common_args)', |
| 1706 '>@(extra_args)', |
| 1707 '--arch', 'x86-64', |
| 1708 '--build', 'newlib_nlib_pnacl', |
| 1709 '--name', '>(out_pnacl_newlib_x86_64)', |
| 1710 '--objdir', '>(objdir_pnacl_newlib_x86_64)', |
| 1711 '--include-dirs=>(tc_include_dir_pnacl_newlib) ^(include_
dirs) >(_include_dirs)', |
| 1712 '--compile_flags=--target=x86_64-unknown-nacl --pnacl-all
ow-translate -arch x86-64 ^(compile_flags) >(_compile_flags) ^(pnacl_compile_fla
gs) >(_pnacl_compile_flags)', |
| 1713 '--gomadir', '<(gomadir)', |
| 1714 '--defines=^(defines) >(_defines)', |
| 1715 '--link_flags=-B>(tc_lib_dir_pnacl_newlib) ^(link_flags)
>(_link_flags)', |
| 1716 '--source-list=^(source_list_pnacl_newlib_x86_64)', |
| 1717 ], |
| 1718 }, |
| 1719 ], |
| 1720 }], # end x64 |
| 1721 # ia32 |
| 1722 ['enable_x86_32!=0 and disable_pnacl==0 and pnacl_native_biased==1
' |
| 1723 'and nlib_target!="" and build_pnacl_newlib!=0', { |
| 1724 'variables': { |
| 1725 'tool_name': 'pnacl_newlib_x86_32', |
| 1726 'out_pnacl_newlib_x86_32%': '<(SHARED_INTERMEDIATE_DIR)/tc_<(
tool_name)/lib-x86-32/>(nlib_target)', |
| 1727 'objdir_pnacl_newlib_x86_32%': '>(INTERMEDIATE_DIR)/<(tool_na
me)/>(_target_name)', |
| 1728 }, |
| 1729 'actions': [ |
| 1730 { |
| 1731 'action_name': 'build newlib x86-32 nlib (via pnacl)', |
| 1732 'variables': { |
| 1733 'source_list_pnacl_newlib_x86_32%': '^|(<(tool_name).>(_t
arget_name).source_list.gypcmd ^(_sources) ^(sources))', |
| 1734 }, |
| 1735 'msvs_cygwin_shell': 0, |
| 1736 'description': 'building >(out_pnacl_newlib_x86_32)', |
| 1737 'inputs': [ |
| 1738 '<@(common_inputs)', |
| 1739 '>!@pymod_do_main(scan_sources -I . >(include_dirs) >(_in
clude_dirs) -S >(sources) >(_sources))', |
| 1740 '>@(extra_deps)', |
| 1741 '>@(extra_deps_pnacl_newlib)', |
| 1742 '^(source_list_pnacl_newlib_x86_32)', |
| 1743 '<(SHARED_INTERMEDIATE_DIR)/sdk/<(TOOLCHAIN_OS)_x86/pnacl
_newlib/stamp.prep' |
| 1744 ], |
| 1745 'outputs': ['>(out_pnacl_newlib_x86_32)'], |
| 1746 'action': [ |
| 1747 '<@(common_args)', |
| 1748 '>@(extra_args)', |
| 1749 '--arch', 'x86-32', |
| 1750 '--build', 'newlib_nlib_pnacl', |
| 1751 '--name', '>(out_pnacl_newlib_x86_32)', |
| 1752 '--objdir', '>(objdir_pnacl_newlib_x86_32)', |
| 1753 '--include-dirs=>(tc_include_dir_pnacl_newlib) ^(include_
dirs) >(_include_dirs)', |
| 1754 '--compile_flags=--target=i686-unknown-nacl --pnacl-allow
-translate -arch x86-32 ^(compile_flags) >(_compile_flags) ^(pnacl_compile_flags
) >(_pnacl_compile_flags)', |
| 1755 '--gomadir', '<(gomadir)', |
| 1756 '--defines=^(defines) >(_defines)', |
| 1757 '--link_flags=-B>(tc_lib_dir_pnacl_newlib) ^(link_flags)
>(_link_flags)', |
| 1758 '--source-list=^(source_list_pnacl_newlib_x86_32)', |
| 1759 ], |
| 1760 }, |
| 1761 ], |
| 1762 }], # end ia32 |
| 1763 ], # end ia32 or x64 |
| 1764 }], |
| 1765 # MIPS |
| 1766 # The shim is not biased since the IRT itself is not biased. |
| 1767 ['target_arch=="mipsel"', { |
| 1768 'target_conditions': [ |
| 1769 ['disable_pnacl==0 and pnacl_native_biased==1 and nlib_target!=""
and build_pnacl_newlib!=0', { |
| 1770 'variables': { |
| 1771 'tool_name': 'pnacl_newlib_mips', |
| 1772 'out_pnacl_newlib_mips%': '<(SHARED_INTERMEDIATE_DIR)/tc_<(to
ol_name)/libmips/>(nlib_target)', |
| 1773 'objdir_pnacl_newlib_mips%': '>(INTERMEDIATE_DIR)/<(tool_name
)/>(_target_name)', |
| 1774 }, |
| 1775 'actions': [ |
| 1776 { |
| 1777 'action_name': 'build newlib mips nlib (via pnacl)', |
| 1778 'variables': { |
| 1779 'source_list_pnacl_newlib_mips%': '^|(<(tool_name).>(_targ
et_name).source_list.gypcmd ^(_sources) ^(sources))', |
| 1780 }, |
| 1781 'msvs_cygwin_shell': 0, |
| 1782 'description': 'building >(out_pnacl_newlib_mips)', |
| 1783 'inputs': [ |
| 1784 '<@(common_inputs)', |
| 1785 '>!@pymod_do_main(scan_sources -I . >(include_dirs) >(_inc
lude_dirs) -S >(sources) >(_sources))', |
| 1786 '>@(extra_deps)', |
| 1787 '>@(extra_deps_pnacl_newlib)', |
| 1788 '^(source_list_pnacl_newlib_mips)', |
| 1789 '<(SHARED_INTERMEDIATE_DIR)/sdk/<(TOOLCHAIN_OS)_x86/pnacl_
newlib/stamp.prep' |
| 1790 ], |
| 1791 'outputs': ['>(out_pnacl_newlib_mips)'], |
| 1792 'action': [ |
| 1793 '<@(common_args)', |
| 1794 '>@(extra_args)', |
| 1795 '--arch', 'mips', |
| 1796 '--build', 'newlib_nlib_pnacl', |
| 1797 '--name', '>(out_pnacl_newlib_mips)', |
| 1798 '--objdir', '>(objdir_pnacl_newlib_mips)', |
| 1799 '--include-dirs=>(tc_include_dir_pnacl_newlib) ^(include_d
irs) >(_include_dirs)', |
| 1800 '--compile_flags=--pnacl-allow-translate -arch mips ^(comp
ile_flags) >(_compile_flags) ^(pnacl_compile_flags) >(_pnacl_compile_flags)', |
| 1801 '--gomadir', '<(gomadir)', |
| 1802 '--defines=^(defines) >(_defines)', |
| 1803 '--link_flags=-B>(tc_lib_dir_pnacl_newlib) ^(link_flags) >
(_link_flags)', |
| 1804 '--source-list=^(source_list_pnacl_newlib_mips)', |
| 1805 ], |
| 1806 }, |
1790 ], | 1807 ], |
1791 }, | 1808 }], |
1792 ], | 1809 ], |
1793 }], | 1810 }], # end MIPS |
1794 ], | 1811 # end pnacl actions for building ABI-biased native libraries |
1795 }], # end MIPS | 1812 ], # end conditions for pnacl biased nlib |
1796 # end pnacl actions for building ABI-biased native libraries | 1813 }, |
1797 ], # end conditions for pnacl biased nlib | 1814 }], |
1798 }, | 1815 ], |
1799 } | 1816 } |
OLD | NEW |