aboutsummaryrefslogtreecommitdiff
path: root/gcc
AgeCommit message (Collapse)AuthorFilesLines
2022-10-25Merge #1614bors[bot]2-0/+19
1614: intrinsics: Add rust_sorry wrapper for unimplemented intrinsics r=CohenArthur a=CohenArthur This allows us to define intrinsics without implementing their body. This will be useful for atomic intrinsics for example, as there are a lot of them and we should work on implementing them one by one properly and slowly Co-authored-by: Arthur Cohen <arthur.cohen@embecosm.com>
2022-10-25intrinsics: Add `sorry_handler` intrinsic handlerArthur Cohen2-0/+19
This allows us to define intrinsics without implementing their body. This will be useful for atomic intrinsics for example, as there are a lot of them and we should work on implementing them one by one properly and slowly
2022-10-24builtins: Rename all bang macro handlersArthur Cohen3-47/+47
This renames all builtin macro functions to `<macro>_handler`. This helps avoiding the `ifdef/undef` dance we performed for MacOS in order to compile the `assert` method
2022-10-21Merge #1608bors[bot]51-1305/+2455
1608: Initial support for closures r=philberty a=philberty This patch series introduces initial support for closures. Rust's implementation of closures is actually pretty clever, the function signatures for closures is driven by the specific FnTrait that the closure implements, this means a CallExpr to a closure becomes a method-call expr with the receiver type being the closure itself using the normal autoderef mechanism to do method selection for an implicit impl block. See https://github.com/rust-lang/rust/blob/7807a694c2f079fd3f395821bcc357eee8650071/library/core/src/ops/function.rs#L54-L71 The other implicit part of this is that arguments being passed to a closure _must_ be passed as a tuple. The down side of allowing libcore to specify the signatures of the closure functions is that we are limited in how we pass arguments, but using a tuple and then using similar machinery from the match-expr to restructure the parameter access to become the tuple accessors makes it look seamless. For example: ```rust let closure_annotated = |i: i32| -> i32 { i + 123 }; let i = 1; closure_annotated(i); ``` Wil generate a function and call-expr such as: ```c i32 test::main::{{closure}} (struct {{closure}} $closure, struct (i32) args) { _1 = args.__0; // this is 'i' return _1 + 123; } __attribute__((cdecl)) i32 test::main () { struct { i32 __0; } D.137; i32 D.140; const i32 a; const struct{{closure}} closure_annotated; const i32 i; try { a = 1; i = 1; D.137.__0 = i; _1 = test::main::{{closure}} (closure_annotated, D.137); <...> } finally { closure_annotated = {CLOBBER(eol)}; } } ``` Note this patch series does not implement the argument capture yet but this patch set is good start to the implementation so far. Addresses #195 Co-authored-by: Philip Herron <philip.herron@embecosm.com>
2022-10-21Merge #1607bors[bot]11-235/+390
1607: Improve AST Fragment class r=CohenArthur a=CohenArthur This changes the APIs around creating AST fragments and refactors the class into its own header and source file, hopefully making it easier to use. This will also help creating "unexpanded" AST fragments for proper builtin macro expansion with the new fixed-point algorithm introduced by #1606 `@liushuyu` pinging you since you've worked extensively with the macro system. Would love your review! Co-authored-by: Arthur Cohen <arthur.cohen@embecosm.com>
2022-10-20Support Closure calls as generic trait boundsPhilip Herron3-47/+104
Addresses #195
2022-10-20Add missing type resolution for function type segmentsPhilip Herron1-7/+62
2022-10-20Add missing hir lowering to function type-path segmentsPhilip Herron6-210/+269
2022-10-20Add missing name resolution to Function type-path segmentsPhilip Herron1-1/+14
2022-10-20Closure support at CallExprPhilip Herron8-12/+361
Closures's need to generate their specific function and setup their argument passing based on the signiture specified in libcore. We can get this information based on the specified bound on the closure. Addresses #195
2022-10-20Initial Type resolution for closuresPhilip Herron9-31/+479
This adds the type checking for a HIR::ClosureExpr which specifies a TyTy::ClosureType whih inherits the FnOnce trait by default. The specialisation of the trait bound needs to be determined by the the mutability and argument capture and moveablity rules. The CallExpr is amended here so that we support CallExpr's for all receivers that implement any of the FnTraits. This means closures and generics that have the relevant type bound of FnTraits we get the same path of type checking. Addresses #195
2022-10-20Add closures to lints and error checkingPhilip Herron3-2/+11
2022-10-20Refactor method call type checkingPhilip Herron3-74/+106
We used a visitor interface to handle type checking argument passing on method call expressions. This was completely unnessecary as all method calls should _always_ be to TyTy::FnType's. The benifit here is that we need to reuse this interface to handle method resolution type checking for FnTrait calls as closure calls dont have an HIR::MethodExpr so we need a more abstract interface so that we can specify the types directly with relevant location info.
2022-10-20Merge #1549bors[bot]3-12/+131
1549: Dump macro declarations properly r=CohenArthur a=CohenArthur Dump `MacroRulesDef` properly Co-authored-by: Arthur Cohen <arthur.cohen@embecosm.com>
2022-10-19Add name resolution for closuresPhilip Herron2-0/+63
This is the first pass at name resolution, it simply creates a new rib for the closure. We eventually need more checks here to enforce what things can be included within the closure.
2022-10-19Formatting cleanup in HIR lowering patternPhilip Herron3-65/+20
Move implementation into cc file from the header and remove unnessecary new lines in the expr lowering header.
2022-10-19Add hir lowering of closure expressionsPhilip Herron23-207/+206
In the AST we have ClosureExprInner and ClosureExprInnerTyped the first is the closure expression of the form: let closure_inferred = |i| i + 1; The second is of the form: let closure_annotated = |i: i32| -> i32 { i + 1 }; Both of these can be seguared into a single HIR::ClosureExpr with an optional return type and parameter types. Addresses #195
2022-10-19Refactor expression hir lowering into cc filePhilip Herron3-699/+803
2022-10-19Add missing fn_once_output langitemPhilip Herron1-0/+7
2022-10-19Merge #1596bors[bot]19-0/+456
1596: Add more implementations for TARGET_RUST_OS_INFO r=philberty a=ibuclaw Pretty much all follow the same template as how darwin was added in the first commit, so mostly uninteresting. The only slight deviation is with `*-*-linux*`, where rather than putting it in a common `glibc-rust.cc` file, I've instead opted to force each platform have their own source file. So Linux gets a `linux-rust.cc` file, and anyone who wants to add Hurd, kFreeBSD, or kOpenSolaris later can do so by adding a case to this switch with the appropriately named file (i.e: `gnu-rust.cc` for Hurd). The same can also be said for MinGW targets - `winnt-rust.cc` is explicitly _not_ set for Cygwin, and I'd prefer that whoever does add Cygwin support will create a separate file for it - otherwise you've either got to modify the target headers to add whatever defines you need in order to abstract the two away, or start adding some defines to `tm_rust.h` to expose hints about the target known at configure time. Linux is also the only implementation that has an `#ifndef` condition, as not all Linux targets include `linux-android.{h,opt}`. Checked dumps of target_options on a plethora of target configurations, though this list is by no means exhaustive. --- <details> <summary>i686-dragonflybsd</summary> ``` target_pointer_width: "32" target_env: "" target_vendor: "unknown" target_endian: "little" target_os: "dragonfly" target_family: "unix" target_arch: "x86" ``` </details> <details> <summary>x86_64-dragonflybsd</summary> ``` target_pointer_width: "64" target_env: "" target_vendor: "unknown" target_endian: "little" target_os: "dragonfly" target_family: "unix" target_feature: "fxsr" target_feature: "sse" target_feature: "sse2" target_feature: "mmx" target_arch: "x86_64" ``` </details> <details> <summary>aarch64-freebsd12, ia64-freebsd6, riscv64-freebsd12</summary> ``` target_pointer_width: "64" target_env: "" target_vendor: "unknown" target_endian: "little" target_os: "freebsd" target_family: "unix" ``` </details> <details> <summary>arm-freebsd12</summary> ``` target_pointer_width: "32" target_env: "" target_vendor: "unknown" target_endian: "little" target_os: "freebsd" target_family: "unix" ``` </details> <details> <summary>i486-freebsd4, i686-freebsd6</summary> ``` target_pointer_width: "32" target_env: "" target_vendor: "unknown" target_endian: "little" target_os: "freebsd" target_family: "unix" target_arch: "x86" ``` </details> <details> <summary>powerpc-freebsd6</summary> ``` target_pointer_width: "32" target_env: "" target_vendor: "unknown" target_endian: "big" target_os: "freebsd" target_family: "unix" ``` </details> <details> <summary>sparc64-freebsd6</summary> ``` target_pointer_width: "64" target_env: "" target_vendor: "unknown" target_endian: "big" target_os: "freebsd" target_family: "unix" ``` </details> <details> <summary>x86_64-freebsd6</summary> ``` target_pointer_width: "64" target_env: "" target_vendor: "unknown" target_endian: "little" target_os: "freebsd" target_family: "unix" target_feature: "fxsr" target_feature: "sse" target_feature: "sse2" target_feature: "mmx" target_arch: "x86_64" ``` </details> <details> <summary>aarch64-fuchsia</summary> ``` target_pointer_width: "64" target_env: "" target_vendor: "unknown" target_endian: "little" target_os: "fushsia" target_family: "unix" ``` </details> <details> <summary>x86_64-fuchsia</summary> ``` target_pointer_width: "64" target_env: "" target_vendor: "unknown" target_endian: "little" target_os: "fushsia" target_family: "unix" target_feature: "fxsr" target_feature: "sse" target_feature: "sse2" target_feature: "mmx" target_arch: "x86_64" ``` </details> <details> <summary>i686-kfreebsd-gnu</summary> ``` target_endian: "little" target_pointer_width: "32" target_arch: "x86" ``` </details> <details> <summary>arm-linux-androideabi</summary> ``` target_pointer_width: "32" target_env: "" target_endian: "little" target_os: "android" target_vendor: "unknown" target_family: "unix" ``` </details> <details> <summary>aarch64-linux-gnu, alpha-linux-gnu, ia64-linux, riscv64-unknown-linux-gnu</summary> ``` target_pointer_width: "64" target_env: "gnu" target_endian: "little" target_os: "linux" target_vendor: "unknown" target_family: "unix" ``` </details> <details> <summary>am33_2.0-linux-gnu, csky-linux-gnu, mips64el-st-linux-gnu, nios2-linux-gnu, powerpcle-linux, riscv32-unknown-linux-gnu, rx-linux, shle-linux, vax-linux-gnu</summary> ``` target_pointer_width: "32" target_env: "gnu" target_endian: "little" target_os: "linux" target_vendor: "unknown" target_family: "unix" ``` </details> <details> <summary>arc-linux-uclibc, bfin-linux-uclibc</summary> ``` target_pointer_width: "32" target_env: "uclibc" target_endian: "little" target_os: "linux" target_vendor: "unknown" target_family: "unix" ``` </details> <details> <summary>arceb-linux-uclibc, or1k-linux-uclibc</summary> ``` target_pointer_width: "32" target_env: "uclibc" target_endian: "big" target_os: "linux" target_vendor: "unknown" target_family: "unix" ``` </details> <details> <summary>frv-linux, h8300-linux, hppa-linux-gnu, m68k-linux, microblaze-linux, mips64octeon-linux, mipsisa32r2-linux-gnu, mipsisa64r2-linux, mips-linux, mips-mti-linux, powerpc64-linux_altivec, powerpc-linux, s390-linux-gnu, sparc-leon3-linux-gnu, sparc-linux-gnu, xtensa-linux</summary> ``` target_pointer_width: "32" target_env: "gnu" target_endian: "big" target_os: "linux" target_vendor: "unknown" target_family: "unix" ``` </details> <details> <summary>hppa64-linux-gnu, s390x-linux-gnu, sparc64-linux</summary> ``` target_pointer_width: "64" target_env: "gnu" target_endian: "big" target_os: "linux" target_vendor: "unknown" target_family: "unix" ``` </details> <details> <summary>i686-pc-linux-gnu, i686-pc-linux</summary> ``` target_pointer_width: "32" target_env: "gnu" target_endian: "little" target_os: "linux" target_vendor: "unknown" target_family: "unix" target_arch: "x86" ``` </details> <details> <summary>or1k-linux-musl</summary> ``` target_pointer_width: "32" target_env: "musl" target_endian: "big" target_os: "linux" target_vendor: "unknown" target_family: "unix" ``` </details> <details> <summary>i686-mingw32crt</summary> ``` target_pointer_width: "32" target_env: "gnu" target_vendor: "pc" target_endian: "little" target_os: "windows" target_family: "windows" target_arch: "x86" ``` </details> <details> <summary>x86_64-mingw32, x86_64-w64-mingw32</summary> ``` target_pointer_width: "64" target_env: "gnu" target_vendor: "pc" target_endian: "little" target_os: "windows" target_family: "windows" target_feature: "fxsr" target_feature: "sse" target_feature: "sse2" target_feature: "mmx" target_arch: "x86_64" ``` </details> <details> <summary>aarch64-netbsd, alpha-netbsd</summary> ``` target_pointer_width: "64" target_env: "" target_vendor: "unknown" target_endian: "little" target_os: "netbsd" target_family: "unix" ``` </details> <details> <summary>arm-netbsdelf, vax-netbsdelf</summary> ``` target_pointer_width: "32" target_env: "" target_vendor: "unknown" target_endian: "little" target_os: "netbsd" target_family: "unix" ``` </details> <details> <summary>hppa-netbsd, m68k-netbsdelf, mips-netbsd, powerpc-netbsd, sh-netbsdelf, sparc-netbsdelf</summary> ``` target_pointer_width: "32" target_env: "" target_vendor: "unknown" target_endian: "big" target_os: "netbsd" target_family: "unix" ``` </details> <details> <summary>i686-netbsdelf9</summary> ``` target_pointer_width: "32" target_env: "" target_vendor: "unknown" target_endian: "little" target_os: "netbsd" target_family: "unix" target_arch: "x86" ``` </details> <details> <summary>sparc64-netbsd</summary> ``` target_pointer_width: "64" target_env: "" target_vendor: "unknown" target_endian: "big" target_os: "netbsd" target_family: "unix" ``` </details> <details> <summary>x86_64-netbsd</summary> ``` target_pointer_width: "64" target_env: "" target_vendor: "unknown" target_endian: "little" target_os: "netbsd" target_family: "unix" target_feature: "fxsr" target_feature: "sse" target_feature: "sse2" target_feature: "mmx" target_arch: "x86_64" ``` </details> <details> <summary>alpha-openbsd</summary> ``` target_pointer_width: "64" target_env: "" target_vendor: "unknown" target_endian: "little" target_os: "openbsd" target_family: "unix" ``` </details> <details> <summary>bfin-openbsd</summary> ``` target_pointer_width: "32" target_env: "" target_vendor: "unknown" target_endian: "little" target_os: "openbsd" target_family: "unix" ``` </details> <details> <summary>i686-openbsd</summary> ``` target_pointer_width: "32" target_env: "" target_vendor: "unknown" target_endian: "little" target_os: "openbsd" target_family: "unix" target_arch: "x86" ``` </details> <details> <summary>sparc64-openbsd</summary> ``` target_pointer_width: "64" target_env: "" target_vendor: "unknown" target_endian: "big" target_os: "openbsd" target_family: "unix" ``` </details> <details> <summary>x86_64-openbsd</summary> ``` target_pointer_width: "64" target_env: "" target_vendor: "unknown" target_endian: "little" target_os: "openbsd" target_family: "unix" target_feature: "fxsr" target_feature: "sse" target_feature: "sse2" target_feature: "mmx" target_arch: "x86_64" ``` </details> <details> <summary>aarch64-wrs-vxworks</summary> ``` target_pointer_width: "64" target_env: "gnu" target_vendor: "wrs" target_endian: "little" target_os: "vxworks" target_family: "unix" ``` </details> <details> <summary>arm-wrs-vxworks7</summary> ``` target_pointer_width: "32" target_env: "gnu" target_vendor: "wrs" target_endian: "little" target_os: "vxworks" target_family: "unix" ``` </details> <details> <summary>i686-wrs-vxworks, i686-wrs-vxworksae</summary> ``` target_pointer_width: "32" target_env: "gnu" target_vendor: "wrs" target_endian: "little" target_os: "vxworks" target_family: "unix" target_arch: "x86" ``` </details> <details> <summary>mips-wrs-vxworks, powerpc-wrs-vxworksae, powerpc-wrs-vxworks, powerpc-wrs-vxworksmils, sh-wrs-vxworks, sparc-wrs-vxworks</summary> ``` target_pointer_width: "32" target_env: "gnu" target_vendor: "wrs" target_endian: "big" target_os: "vxworks" target_family: "unix" ``` </details> <details> <summary>arm-uclinux_eabi, bfin-uclinux, c6x-uclinux</summary> ``` target_endian: "little" target_pointer_width: "32" ``` </details> <details> <summary>lm32-uclinux, m68k-uclinux, moxie-uclinux, xtensa-uclinux</summary> ``` target_endian: "big" target_pointer_width: "32" ``` </details> Co-authored-by: Iain Buclaw <ibuclaw@gdcproject.org>
2022-10-19ast: Improve Fragment APIArthur Cohen6-30/+47
2022-10-19rust: Replace uses of ASTFragment -> FragmentArthur Cohen8-235/+100
2022-10-19ast: Refactor ASTFragment -> Fragment classArthur Cohen3-0/+273
2022-10-17Add check for recursive trait cyclesPhilip Herron3-1/+45
This adds a new RAII style TraitQueryGuard so that we can manage the query lifetime when resolving a trait. This adds in a DefId into a set when we begin to resolve and then finally removes it when completed. This allows us to add in a check at the start if this DefId is already within the set which means this is a trait cycle. Fixes #1589
2022-10-17Merge #1597bors[bot]1-9/+32
1597: ast: Module: unloaded module and inner attributes r=CohenArthur a=jdupak Adds support for unloaded modules and dumps also inner attributes. Resolves issue found in #1548. Co-authored-by: Jakub Dupak <dev@jakubdupak.com>
2022-10-17dump: Dump macro rules definitionArthur Cohen3-12/+131
Co-authored-by: jdupak <dev@jakubdupak.com>
2022-10-17Merge #1594 #1595bors[bot]9-52/+98
1594: Refactor TraitResolver to not require a visitor r=philberty a=philberty We used a visitor to dispatch the HIR::Item so that we could cast it directly to an HIR::Trait and then check for nullptr if it failed. This patch changes this to simply use our new enum item_type_kind to switch so we can directly static_cast. 1595: Support outer attribute handling on trait items just like normal items r=philberty a=philberty This patch adds a proxy class ItemWrapper to be a proxy allowing us to use the same code paths for attribute handling as we have with normal items. We need this so we can grab the fn trait associated type lang item's. Which are being missed currently. Addresses #195 Co-authored-by: Philip Herron <philip.herron@embecosm.com>
2022-10-15ast: Module: unloaded module and inner attributesJakub Dupak1-9/+32
Signed-off-by: Jakub Dupak <dev@jakubdupak.com>
2022-10-14Merge #1548 #1593bors[bot]1-3/+36
1548: Dump module items r=CohenArthur a=CohenArthur 1593: ast: dump TypeAlias r=CohenArthur a=jdupak Implements ast dump for TypeAlias Co-authored-by: Arthur Cohen <arthur.cohen@embecosm.com> Co-authored-by: Jakub Dupak <dev@jakubdupak.com>
2022-10-14dump: Fix module dumpingArthur Cohen1-4/+4
Co-authored-by: jdupak <dev@jakubdupak.com>
2022-10-14Merge #1590bors[bot]1-21/+147
1590: AST: more dump improvements r=dafaust a=dafaust This PR adds new AST dump visitors for several nodes, and cleans up some minor formatting issues in blocks without tail expressions and if expressions. Co-authored-by: David Faust <david.faust@oracle.com>
2022-10-14dump: Dump items within modulesArthur Cohen1-1/+17
2022-10-14dump: Emit visibility when dumping itemsArthur Cohen1-0/+1
2022-10-14Support outer attribute handling on trait items just like normal itemsPhilip Herron7-15/+72
This patch adds a proxy class ItemWrapper to be a proxy allowing us to use the same code paths for attribute handling as we have with normal items. We need this so we can grab the fn trait associated type lang item's. Which are being missed currently. Addresses #195
2022-10-14ast: dump TypeAliasJakub Dupak1-2/+18
Signed-off-by: Jakub Dupak <dev@jakubdupak.com>
2022-10-14Merge #1580bors[bot]12-35/+1373
1580: Add early name resolver r=CohenArthur a=CohenArthur This addresses our issue with name resolution (#1576) not acting on macros early enough but does not fix it yet. This name resolver performs the same macro name resolution as what was previously done by the AttrVisitor visitor and macro expander. It also resolves macro expressions in builtin-macros properly, as well as expanded AST nodes when necessary. Co-authored-by: Arthur Cohen <arthur.cohen@embecosm.com>
2022-10-14Refactor TraitResolver to not require a visitorPhilip Herron2-37/+26
We used a visitor to dispatch the HIR::Item so that we could cast it directly to an HIR::Trait and then check for nullptr if it failed. This patch changes this to simply use our new enum item_type_kind to switch so we can directly static_cast.
2022-10-14Merge #1587bors[bot]10-31/+157
1587: Method resolution must support multiple candidates r=philberty a=philberty This patch fixes bad method resolution in our operator_overload_9 case. When we have a &mut reference to something and we deref we must resolve to the mutable reference impl block. The interface we are using to resolve methods is the can_eq interface which allows for permissive mutability which means allowing for mutable reference being unified with an immutable one. This meant we actual match against both the immutable and mutable version leading to multiple candidate error. Fixes #1588 Co-authored-by: Philip Herron <philip.herron@embecosm.com>
2022-10-14Merge #1583bors[bot]3-24/+37
1583: Support type resolution on super traits on dyn objects r=philberty a=philberty When checking if specified bounds satisfy other bounds we must lookup the super traits. To finish the support for super traits we need to redo the computation of method addresses to support super traits. Addresses #914 Co-authored-by: Philip Herron <philip.herron@embecosm.com>
2022-10-13ast: dump: RangeExprsDavid Faust1-6/+25
2022-10-13ast: dump: various simple ExprsDavid Faust1-6/+39
Adds dump for: - BorrowExpr - DereferenceExpr - ErrorPropagationExpr - NegationExpr - TypeCastExpr - GroupedExpr
2022-10-13ast: dump: ArrayExprDavid Faust1-4/+28
2022-10-13ast: dump: ComparisonExpr and LazyBooleanExprDavid Faust1-2/+48
2022-10-13ast: dump: minor fixups to IfExpr formattingDavid Faust1-1/+5
2022-10-13ast: dump: fix extra newline in block without tailDavid Faust1-2/+2
2022-10-13Merge #1584bors[bot]2-0/+11
1584: Add missing lang item mappings r=philberty a=philberty Adds the missing fn_once lang item and the missing rust-call abi option. Co-authored-by: Philip Herron <philip.herron@embecosm.com>
2022-10-13Method resolution must support multiple candidatesPhilip Herron10-31/+157
This patch fixes bad method resolution in our operator_overload_9 case. When we have a &mut reference to something and we deref we must resolve to the mutable reference impl block. The interface we are using to resolve methods is the can_eq interface which allows for permissive mutability which means allowing for mutable reference being unified with an immutable one. This meant we actual match against both the immutable and mutable version leading to multiple candidate error. The fix here adds a method resolution flag to the can_eq interface so that we enforce mutability equality. The other hack is that we do not allow can_eq of ParamTypes to generic Slices. I think there is some subtle thing going on for that case. The Rustc method resolver actually filters the impl blocks for reference types based looking up the relevant lang items we need to do this as well but is a much larger refactor to our method resolver which should be done seperately. Fixes #1588
2022-10-13rust: Implement TARGET_RUST_OS_INFO for *-*-*linux*.Iain Buclaw3-0/+67
gcc/ChangeLog: * config.gcc (*linux*): Set rust target_objs, and target_has_targetrustm, * config/t-linux (linux-rust.o): New rule. * config/linux-rust.cc: New file.
2022-10-13rust: Implement TARGET_RUST_OS_INFO for i[34567]86-*-mingw* and x86_64-*-mingw*.Iain Buclaw3-0/+46
gcc/ChangeLog: * config.gcc (i[34567]86-*-mingw* | x86_64-*-mingw*): Set rust_target_objs and target_has_targetrustm. * config/t-winnt (winnt-rust.o): New rule. * config/winnt-rust.cc: New file.
2022-10-13rust: Implement TARGET_RUST_OS_INFO for *-*-fuchsia*.Iain Buclaw3-0/+64
gcc/ChangeLog: * config.gcc (*-*-fuchsia): Set tmake_rule, rust_target_objs, and target_has_targetrustm. * config/fuchsia-rust.cc: New file. * config/t-fuchsia: New file.