mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-09-24 18:50:09 +01:00
Refactors the link driver to automatically compile and cache the carbon prelude for use in linking. Implements a `carbon_library` rule for compiling the Core library dependencies in the examples.
21 lines
571 B
Plaintext
21 lines
571 B
Plaintext
// Part of the Carbon Language project, under the Apache License v2.0 with LLVM
|
|
// Exceptions. See /LICENSE for license information.
|
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
|
|
|
// TODO: This library is not part of the design. Either write a matching
|
|
// proposal or remove this.
|
|
|
|
impl package Core library "io";
|
|
|
|
fn PrintStr(msg: str) {
|
|
let size: i64 = msg.Size() as i64;
|
|
var i: i64 = 0;
|
|
while (i < size) {
|
|
PrintChar(msg[i]);
|
|
++i;
|
|
}
|
|
}
|
|
|
|
// TODO: Change this to a global constant once they are fully supported.
|
|
fn EOF() -> i32 { return -1; }
|