Generated v2 prefixes
This commit is contained in:
+4
-1
@@ -404,12 +404,15 @@ def compile(bench_paths, **args):
|
||||
f.writeln()
|
||||
|
||||
# create suite struct
|
||||
#
|
||||
f.writeln('#if defined(__APPLE__)')
|
||||
f.writeln('__attribute__((section("__DATA,_bench_suites")))')
|
||||
f.writeln('#else')
|
||||
# note we place this in the custom bench_suites section with
|
||||
# minimum alignment, otherwise GCC ups the alignment to
|
||||
# 32-bytes for some reason
|
||||
f.writeln('__attribute__((section("_bench_suites"), '
|
||||
'aligned(1)))')
|
||||
f.writeln('#endif')
|
||||
f.writeln('const struct bench_suite __bench__%s__suite = {'
|
||||
% suite.name)
|
||||
f.writeln(4*' '+'.name = "%s",' % suite.name)
|
||||
|
||||
@@ -73,7 +73,7 @@ def changefile(from_prefix, to_prefix, from_path, to_path, *,
|
||||
shutil.copystat(from_path, to_path)
|
||||
|
||||
if to_path_temp:
|
||||
os.rename(to_path, from_path)
|
||||
shutil.move(to_path, from_path)
|
||||
elif from_path != '-':
|
||||
os.remove(from_path)
|
||||
|
||||
|
||||
+4
-1
@@ -412,12 +412,15 @@ def compile(test_paths, **args):
|
||||
f.writeln()
|
||||
|
||||
# create suite struct
|
||||
#
|
||||
f.writeln('#if defined(__APPLE__)')
|
||||
f.writeln('__attribute__((section("__DATA,_test_suites")))')
|
||||
f.writeln('#else')
|
||||
# note we place this in the custom test_suites section with
|
||||
# minimum alignment, otherwise GCC ups the alignment to
|
||||
# 32-bytes for some reason
|
||||
f.writeln('__attribute__((section("_test_suites"), '
|
||||
'aligned(1)))')
|
||||
f.writeln('#endif')
|
||||
f.writeln('const struct test_suite __test__%s__suite = {'
|
||||
% suite.name)
|
||||
f.writeln(4*' '+'.name = "%s",' % suite.name)
|
||||
|
||||
Reference in New Issue
Block a user