mirror of
https://github.com/google/comprehensive-rust.git
synced 2025-06-01 07:09:35 +02:00
This is for consistency: if a block returns `()`, and the last expression of the block also returns `()`, then the final `;` can be left out. However, this is a little confusing (I was asked about this in a class today) and it is inconsistent. See https://rust-lang.github.io/rust-clippy/master/index.html#/semicolon_if_nothing_returned for details.
28 lines
846 B
Rust
28 lines
846 B
Rust
// Copyright 2023 Google LLC
|
|
//
|
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
// you may not use this file except in compliance with the License.
|
|
// You may obtain a copy of the License at
|
|
//
|
|
// http://www.apache.org/licenses/LICENSE-2.0
|
|
//
|
|
// Unless required by applicable law or agreed to in writing, software
|
|
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
// See the License for the specific language governing permissions and
|
|
// limitations under the License.
|
|
|
|
use cc::Build;
|
|
use std::env;
|
|
|
|
fn main() {
|
|
env::set_var("CROSS_COMPILE", "aarch64-none-elf");
|
|
env::set_var("CC", "clang");
|
|
|
|
Build::new()
|
|
.file("entry.S")
|
|
.file("exceptions.S")
|
|
.file("idmap.S")
|
|
.compile("empty");
|
|
}
|