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

Side by Side Diff: tests/toolchain/nacl.scons

Issue 454593002: PNaCl driver: Add libgcc to mixed native/bitcode links (Closed) Base URL: svn://svn.chromium.org/native_client/trunk/src/native_client
Patch Set: explicitly modify env rather than using var expansion Created 6 years, 4 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 | « pnacl/driver/pnacl-driver.py ('k') | tests/toolchain/needs_libgcc.c » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # -*- python -*- 1 # -*- python -*-
2 # Copyright (c) 2012 The Native Client Authors. All rights reserved. 2 # Copyright (c) 2012 The Native Client Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 Import('env') 6 Import('env')
7 7
8 # force inclusion of entire library, so that we can validate it 8 # force inclusion of entire library, so that we can validate it
9 # NOTE: This approach does not work for -lc because of tons of 9 # NOTE: This approach does not work for -lc because of tons of
10 # undefined symbols which would have to be stubbed out 10 # undefined symbols which would have to be stubbed out
(...skipping 534 matching lines...) Expand 10 before | Expand all | Expand 10 after
545 'run_pic_constant_test') 545 'run_pic_constant_test')
546 546
547 WRAP_LINK_FLAGS = ['-Wl,--wrap=foo', '-Wl,--wrap=bar'] 547 WRAP_LINK_FLAGS = ['-Wl,--wrap=foo', '-Wl,--wrap=bar']
548 env.ComponentLibrary('wrap_lib', ['wrap_lib1.c', 'wrap_lib2.c']) 548 env.ComponentLibrary('wrap_lib', ['wrap_lib1.c', 'wrap_lib2.c'])
549 nexe = env.ComponentProgram('wrap', ['wrap_main.c'], 549 nexe = env.ComponentProgram('wrap', ['wrap_main.c'],
550 EXTRA_LINKFLAGS=WRAP_LINK_FLAGS, 550 EXTRA_LINKFLAGS=WRAP_LINK_FLAGS,
551 EXTRA_LIBS=['wrap_lib', '${NONIRT_LIBS}']) 551 EXTRA_LIBS=['wrap_lib', '${NONIRT_LIBS}'])
552 node = env.CommandSelLdrTestNacl('wrap.out', nexe, 552 node = env.CommandSelLdrTestNacl('wrap.out', nexe,
553 stdout_golden=env.File('wrap.stdout')) 553 stdout_golden=env.File('wrap.stdout'))
554 env.AddNodeToTestSuite(node, ['toolchain_tests','small_tests'], 'run_wrap_test') 554 env.AddNodeToTestSuite(node, ['toolchain_tests','small_tests'], 'run_wrap_test')
555
556 if (env.Bit('target_x86_32') and env.Bit('bitcode') and
557 not env.Bit('pnacl_generate_pexe') and
558 env['TOOLCHAIN_FEATURE_VERSION'] >= 7):
559 # This test compiles a file that will need to generate a call to a compiler-rt
560 # function (__udivdi3) on x86-32. Ensure that when we pre-translate to a
561 # native object file, libgcc is included in the bitcode link to satisfy the
562 # reference.
563 mixedlink_env = env.Clone()
564 mixedlink_env.Append(CCFLAGS=['--pnacl-allow-translate',
565 '--pnacl-allow-native',
566 '-arch', 'x86-32'])
567 mixedlink_env.Append(LINKFLAGS=['--pnacl-allow-translate',
568 '--pnacl-allow-native',
569 '-arch', 'x86-32'])
570 nexe = mixedlink_env.ComponentProgram('libgcc_mixed_link', 'needs_libgcc.c',
571 EXTRA_LIBS=['${NONIRT_LIBS}'])
572 node = mixedlink_env.CommandSelLdrTestNacl('libgcc_mixed_link.out', nexe,
573 ['9', '3'])
574 mixedlink_env.AddNodeToTestSuite(node, ['nonpexe_tests', 'small_tests'],
575 'run_libgcc_mixed_link_test')
OLDNEW
« no previous file with comments | « pnacl/driver/pnacl-driver.py ('k') | tests/toolchain/needs_libgcc.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698