~louis/ubuntu/trusty/clamav/lp799623_fix_logrotate

« back to all changes in this revision

Viewing changes to libclamav/c++/llvm/tools/llvmc/example/mcc16/README

  • Committer: Bazaar Package Importer
  • Author(s): Scott Kitterman
  • Date: 2010-03-12 11:30:04 UTC
  • mfrom: (0.41.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20100312113004-b0fop4bkycszdd0z
Tags: 0.96~rc1+dfsg-0ubuntu1
* New upstream RC - FFE (LP: #537636):
  - Add OfficialDatabaseOnly option to clamav-base.postinst.in
  - Add LocalSocketGroup option to clamav-base.postinst.in
  - Add LocalSocketMode option to clamav-base.postinst.in
  - Add CrossFilesystems option to clamav-base.postinst.in
  - Add ClamukoScannerCount option to clamav-base.postinst.in
  - Add BytecodeSecurity opiton to clamav-base.postinst.in
  - Add DetectionStatsHostID option to clamav-freshclam.postinst.in
  - Add Bytecode option to clamav-freshclam.postinst.in
  - Add MilterSocketGroup option to clamav-milter.postinst.in
  - Add MilterSocketMode option to clamav-milter.postinst.in
  - Add ReportHostname option to clamav-milter.postinst.in
  - Bump libclamav SO version to 6.1.0 in libclamav6.install
  - Drop clamdmon from clamav.examples (no longer shipped by upstream)
  - Drop libclamav.a from libclamav-dev.install (not built by upstream)
  - Update SO version for lintian override for libclamav6
  - Add new Bytecode Testing Tool, usr/bin/clambc, to clamav.install
  - Add build-depends on python and python-setuptools for new test suite
  - Update debian/copyright for the embedded copy of llvm (using the system
    llvm is not currently feasible)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
This is a basic compiler driver for the PIC16 toolchain that shows how to create
 
2
your own llvmc-based drivers. It is based on the example/Skeleton template.
 
3
 
 
4
The PIC16 toolchain looks like this:
 
5
 
 
6
clang-cc (FE) -> llvm-ld (optimizer) -> llc (codegen) -> native-as -> native-ld
 
7
 
 
8
Following features were requested by Sanjiv:
 
9
 
 
10
From: Sanjiv Gupta <sanjiv.gupta <at> microchip.com>
 
11
Subject: Re: llvmc for PIC16
 
12
Newsgroups: gmane.comp.compilers.llvm.devel
 
13
Date: 2009-06-05 06:51:14 GMT
 
14
 
 
15
The salient features that we want to have in the driver are:
 
16
1. llvm-ld will be used as "The Optimizer".
 
17
2. If the user has specified to generate the final executable, then
 
18
llvm-ld should run on all the .bc files generated by clang and create a
 
19
single optimized .bc file for further tools.
 
20
3. -Wo <options> - pass optimizations to the llvm-ld
 
21
4. mcc16 -Wl <options> - pass options to native linker.
 
22
5. mcc16 -Wa <options> - pass options to native assembler.
 
23
 
 
24
Here are some example command lines and sample command invocations as to
 
25
what should be done.
 
26
 
 
27
$ mcc16 -S foo.c
 
28
// [clang-cc foo.c] -> foo.bc
 
29
// [llvm-ld foo.bc] -> foo.opt.bc
 
30
// [llc foo.opt.bc] -> foo.s
 
31
 
 
32
$ mcc16 -S foo.c bar.c
 
33
// [clang-cc foo.c] -> foo.bc
 
34
// [llvm-ld foo.bc] -> foo.opt.bc
 
35
// [llc foo.opt.bc] -> foo.s
 
36
// [clang-cc bar.c] -> bar.bc
 
37
// [llvm-ld bar.bc] -> bar.opt.bc
 
38
// [llc bar.opt.bc] -> bar.s
 
39
 
 
40
** Use of -g causes llvm-ld to run with -disable-opt
 
41
$ mcc16 -S -g foo.c
 
42
// [clang-cc foo.c] -> foo.bc
 
43
// [llvm-ld -disable-opt foo.bc] -> foo.opt.bc
 
44
// [llc foo.opt.bc] -> foo.s
 
45
 
 
46
** -I is passed to clang-cc, -pre-RA-sched=list-burr to llc.
 
47
$ mcc16 -S -g -I ../include -pre-RA-sched=list-burr foo.c
 
48
// [clang-cc -I ../include foo.c] -> foo.bc
 
49
// [llvm-ld -disable-opt foo.bc] -> foo.opt.bc
 
50
// [llc -pre-RA-sched=list-burr foo.opt.bc] -> foo.s
 
51
 
 
52
** -Wo passes options to llvm-ld
 
53
$ mcc16 -Wo=opt1,opt2 -S -I ../include -pre-RA-sched=list-burr foo.c
 
54
// [clang-cc -I ../include foo.c] -> foo.bc
 
55
// [llvm-ld -opt1 -opt2 foo.bc] -> foo.opt.bc
 
56
// [llc -pre-RA-sched=list-burr foo.opt.bc] -> foo.s
 
57
 
 
58
** -Wa passes options to native as.
 
59
$ mcc16 -c foo.c -Wa=opt1
 
60
// [clang-cc foo.c] -> foo.bc
 
61
// [llvm-ld foo.bc] -> foo.opt.bc
 
62
// [llc foo.opt.bc] -> foo.s
 
63
// [native-as -opt1 foo.s] -> foo.o
 
64
 
 
65
$ mcc16 -Wo=opt1 -Wl=opt2 -Wa=opt3 foo.c bar.c
 
66
// [clang-cc foo.c] -> foo.bc
 
67
// [clang-cc bar.c] -> bar.bc
 
68
// [llvm-ld -opt1 foo.bc bar.bc] -> a.out.bc
 
69
// [llc a.out.bc] -> a.out.s
 
70
// [native-as -opt3 a.out.s] -> a.out.o
 
71
// [native-ld -opt2 a.out.o] -> a.out
 
72
 
 
73
Is this achievable by a tablegen based driver ?
 
74
 
 
75
- Sanjiv