]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/config/darwin-rust.cc
Update copyright years.
[thirdparty/gcc.git] / gcc / config / darwin-rust.cc
CommitLineData
f23567a8 1/* Darwin support needed only by Rust front-end.
a945c346 2 Copyright (C) 2022-2024 Free Software Foundation, Inc.
f23567a8
IB
3
4GCC is free software; you can redistribute it and/or modify it under
5the terms of the GNU General Public License as published by the Free
6Software Foundation; either version 3, or (at your option) any later
7version.
8
9GCC is distributed in the hope that it will be useful, but WITHOUT ANY
10WARRANTY; without even the implied warranty of MERCHANTABILITY or
11FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12for more details.
13
14You should have received a copy of the GNU General Public License
15along with GCC; see the file COPYING3. If not see
16<http://www.gnu.org/licenses/>. */
17
18#include "config.h"
19#include "system.h"
20#include "coretypes.h"
21#include "tm.h"
22#include "tm_rust.h"
23#include "rust/rust-target.h"
24#include "rust/rust-target-def.h"
25
26/* Implement TARGET_RUST_OS_INFO for Darwin targets. */
27
28static void
29darwin_rust_target_os_info (void)
30{
31 rust_add_target_info ("target_family", "unix");
32
33 /* TODO: rust actually has "macos", "ios", and "tvos" for darwin targets, but
34 gcc seems to have no current support for them, so assuming that target_os
35 is always macos for now. */
36 rust_add_target_info ("target_os", "macos");
37 rust_add_target_info ("target_vendor", "apple");
38 rust_add_target_info ("target_env", "");
39}
40
41#undef TARGET_RUST_OS_INFO
42#define TARGET_RUST_OS_INFO darwin_rust_target_os_info
43
44struct gcc_targetrustm targetrustm = TARGETRUSTM_INITIALIZER;