Brian Anderson
007422cc04
Change the linkage order on linux and add -ldl
...
-lrt and -ldl need to be specified after -lrustrt since they are only used by
rustrt.
2011-10-17 10:41:22 -07:00
Brian Anderson
b42e551285
Only link librt on linux
2011-10-16 02:36:42 -07:00
Haitao Li
ad5014bf4c
Fix link error by explicitly link needed DSOs
...
Building Rust(version 280bc56
) on Ubuntu 11.10 failed with link error,
like:
compile_and_link: stage0/lib/rustc/i686-unknown-linux-gnu/lib/libstd.so
compile_and_link: stage0/lib/rustc/i686-unknown-linux-gnu/bin/rustc
/local/src/rust/build/stage0/lib/rustc/i686-unknown-linux-gnu/lib/librustrt.so:
undefined reference to `clock_gettime'
collect2: ld returned 1 exit status
error: linking with gcc failed with code 1
GCC toolchain released by Ubuntu 11.10 introduced a few compiler flags
that are different with upstream GCC[1]. Flags "-Wl,--as-needed' and
'-Wl,--no-copy-dt-needed-entries' are passed by default.
Function clock_gettime from librt is used by librustrt, indirectly by
rustc. It is necessary to explicitly pass the "-lrt" flags when building
rustc.
Please note since the toolchain changes will be the default in the next
release(2.22) of binutils, this is not actually a Debian/Ubuntu specific
issue.
1. https://wiki.ubuntu.com/OneiricOcelot/ReleaseNotes#GCC_4.6_Toolchain
Signed-off-by: Haitao Li <lihaitao@gmail.com>
2011-10-16 17:12:30 +08:00
Brian Anderson
280bc5633d
Add Elly Jones to AUTHORS.txt
2011-10-15 15:53:18 -07:00
Elly Jones
a5dc6a7aa8
Update LinkModules invocation to use new prototype
...
LLVM revision 141606 changes the prototype of llvm::Linker::LinkModules.
Signed-off-by: Elly Jones <elly@leptoquark.net>
2011-10-15 15:53:18 -07:00
Brian Anderson
d77996a30f
Add LLVM 3.1svn to supported versions
2011-10-15 15:53:18 -07:00
Marijn Haverbeke
0a01144797
Use trans_expr_save_in instead of trans_expr when appropriate
...
This guards against passing a save_in destination to nil or bot-typed things.
2011-10-14 11:27:16 +02:00
Marijn Haverbeke
06257d66e7
Don't crash when reporting an unresolved import in the nil scope
...
Closes #1027
2011-10-14 11:25:14 +02:00
Brian Anderson
3808a498cd
Remove an unnecessary visitor from rustc::middle::fn_usage
2011-10-13 14:55:50 -07:00
Brian Anderson
acf9b83e71
Fix a use of visit in rustc::middle::fn_usage
...
This was working by just skipping an AST node instead of doing the advertised
check. I can't find a test case for it, but this is more correct.
2011-10-13 14:55:47 -07:00
Brian Anderson
bc4c3df1bf
Don't allow the value of generic bare functions to be taken
...
Issue #1038
2011-10-13 14:39:30 -07:00
Brian Anderson
89466ffd74
Rename rustc::middle::unsafeck to fn_usage
...
I'm going to add further checks unrelated to unsafe.
Issue #1038
2011-10-13 12:25:57 -07:00
Brian Anderson
60cfa91897
Add a test that generic bare functions can be bound
...
Issue #1022
2011-10-13 12:16:26 -07:00
Marijn Haverbeke
6a7800508b
Make trans_anon_obj properly thread its bcx
...
Closes #893
Unfortunately, anon objs are still so broken as to be useless
(fields don't work).
2011-10-13 18:04:09 +02:00
Marijn Haverbeke
e4c91fdf65
Properly fill single-variant zero-arg tag values.
...
Closes #1034 . Closes #1035 .
2011-10-13 15:14:09 +02:00
Brian Anderson
6e67c4b253
Cleanse usage of some unsafe functions on win32
2011-10-12 16:42:13 -07:00
Niko Matsakis
e8a0e592da
reimplement some of the unsafe stuff which got lost
...
- blocks inherit unsafety
- remove the --check-unsafe flag
- add unsafe annotations where needed to get things to compile
2011-10-12 16:33:07 -07:00
Niko Matsakis
f994871a3d
remove unsafe tags
2011-10-12 16:33:07 -07:00
Niko Matsakis
5b015288b5
new test
2011-10-12 16:33:07 -07:00
Niko Matsakis
215b1ab000
make compiler emit more than 1 error in the case of unsafe
2011-10-12 16:33:07 -07:00
Niko Matsakis
3b66806624
prohibit ptr deref unless in unsafe code
2011-10-12 16:33:07 -07:00
Niko Matsakis
a56698575c
fix error msg
2011-10-12 16:33:07 -07:00
Niko Matsakis
e8a29fbe3c
add some new tests
2011-10-12 16:33:07 -07:00
Niko Matsakis
70164739e8
convert a few tests from unsafe fns to fns with unsafe bodies
2011-10-12 16:33:07 -07:00
Niko Matsakis
9f9deff7af
make a good error msg if you try to use an unsafe fn for a test
2011-10-12 16:33:07 -07:00
Niko Matsakis
b1a9d71218
improve the span used in test generation
2011-10-12 16:33:07 -07:00
Niko Matsakis
81533ff737
add pass to check that unsafe fns cannot be used as values
2011-10-12 16:33:06 -07:00
Niko Matsakis
e39db5a100
all tests pass
2011-10-12 16:33:06 -07:00
Niko Matsakis
db16fce77f
all tests pass
2011-10-12 16:33:06 -07:00
Niko Matsakis
85da98db4a
continue to annotate functions as unsafe where neccessary
2011-10-12 16:33:06 -07:00
Niko Matsakis
f2cd33df72
continue to annotate trans functions as unsafe where neccessary
2011-10-12 16:33:06 -07:00
Niko Matsakis
2094668949
continue to annotate trans functions as unsafe where neccessary
2011-10-12 16:33:06 -07:00
Niko Matsakis
d4d7eb069b
add unsafe tags into various points in the translation chains
...
and so forth
2011-10-12 16:33:06 -07:00
Niko Matsakis
c1cefa52d0
Add unsafe tags to usage of LLVM funcs
2011-10-12 16:33:06 -07:00
Niko Matsakis
8ea1a8eef9
make treatment of unchecked/unsafe blocks more uniform
...
also repair various errors in the parser related to such blocks.
rename checked_blk to default_blk to reflect the fact that it
inherits its purity from the surrounding context.
2011-10-12 16:32:57 -07:00
Brian Anderson
8366f3caa3
Revert "Test for #954 "
...
This reverts commit 7edb043889
.
2011-10-12 15:53:54 -07:00
Brian Anderson
7edb043889
Test for #954
2011-10-12 15:53:15 -07:00
Brian Anderson
a1d046c75c
Register snapshots
2011-10-12 15:44:00 -07:00
Brian Anderson
40fa88febb
Ignore stdtest::os::test_setenv. Fails periodically on mac
2011-10-12 15:27:58 -07:00
Niko Matsakis
212707ce84
make native functions markable as unsafe and incorporate that
...
into the type check
2011-10-12 14:39:34 -07:00
Niko Matsakis
24b201fa48
skip test, remove whitespace
2011-10-12 14:39:34 -07:00
Niko Matsakis
b9a9559c91
correct lines over 78 chars
2011-10-12 14:39:34 -07:00
Niko Matsakis
f3c68e7238
enable unsafe checking but only with a flag --check-unsafe
2011-10-12 14:39:34 -07:00
Niko Matsakis
cbe8da0655
make treatment of unchecked/unsafe blocks more uniform
...
also repair various errors in the parser related to such blocks.
rename checked_blk to default_blk to reflect the fact that it
inherits its purity from the surrounding context.
2011-10-12 14:39:24 -07:00
Niko Matsakis
e9569371f7
add 'u' to one other place it was missing
2011-10-12 14:26:47 -07:00
Niko Matsakis
f304c1bee5
add 'u' to decoder (kinda' important)
2011-10-12 14:26:47 -07:00
Niko Matsakis
8c1231ae5f
fix test to include a main() function
2011-10-12 14:26:47 -07:00
Niko Matsakis
d207bc3a0b
it is also legal to call unsafe functions from other unsafe functions
2011-10-12 14:26:47 -07:00
Niko Matsakis
046ca827dd
Add unsafe blocks, unsafe functions, and two rudimentary tests
...
related to them
2011-10-12 14:26:47 -07:00
Niko Matsakis
29584cc5ac
Extend the unchecked block stuff to allow unsafe blocks as well.
2011-10-12 14:26:47 -07:00