Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(330)

Side by Side Diff: lib/asan/lit_tests/lit.cfg

Issue 6443046: [compiler-rt] initial support for cmake builds of lit-style tests (Closed) Base URL: https://llvm.org/svn/llvm-project/compiler-rt/trunk/
Patch Set: z Created 12 years, 6 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « lib/asan/lit_tests/deep_tail_call.cc ('k') | lib/asan/lit_tests/lit.site.cfg.in » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 # -*- Python -*-
2
3 import os
4
5 def get_required_attr(config, attr_name):
6 attr_value = getattr(config, attr_name, None)
7 if not attr_value:
8 lit.fatal("No attribute %r in test configuration! You may need to run "
9 "tests from your build directory or add this attribute "
10 "to lit.site.cfg " % attr_name)
11 return attr_value
12
13 # Setup attributes common for all compiler-rt projects.
14 llvm_src_root = get_required_attr(config, 'llvm_src_root')
15 compiler_rt_lit_cfg = os.path.join(llvm_src_root, "projects", "compiler-rt",
16 "lib", "lit.common.cfg")
17 lit.load_config(config, compiler_rt_lit_cfg)
18
19 # Setup config name.
20 config.name = 'AddressSanitizer'
21
22 # Setup source root.
23 config.test_source_root = os.path.dirname(__file__)
24
25 # Setup default compiler flags used with -faddress-sanitizer option.
chandlerc 2012/07/31 08:40:41 Are all of these really required?
26 clang_asan_cxxflags = ("-faddress-sanitizer "
27 + "-mno-omit-leaf-frame-pointer "
28 + "-fno-omit-frame-pointer "
29 + "-fno-optimize-sibling-calls "
30 + "-g")
31 config.substitutions.append( ("%clang_asan ", (" " + config.clang + " " +
32 clang_asan_cxxflags + " ")) )
33
34 # Setup path to symbolizer script.
35 asan_source_dir = os.path.join(config.test_source_root, "..")
36 symbolizer = os.path.join(asan_source_dir,
37 'scripts', 'asan_symbolize.py')
38 if not os.path.exists(symbolizer):
39 lit.fatal("Can't find symbolizer script on path %r" % symbolizer)
chandlerc 2012/07/31 08:40:41 Any reason why not to pull this from the .site.cfg
40 config.substitutions.append( ('%symbolizer', (" " + symbolizer + " " )))
41
42 # Default test suffixes.
43 config.suffixes = ['.c', '.cc', '.cpp']
OLDNEW
« no previous file with comments | « lib/asan/lit_tests/deep_tail_call.cc ('k') | lib/asan/lit_tests/lit.site.cfg.in » ('j') | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b