VirtualBox

source: vbox/trunk/src/VBox/Runtime/common/misc/buildconfig.cpp

Last change on this file was 106061, checked in by vboxsync, 8 weeks ago

Copyright year updates by scm.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 3.6 KB
Line 
1/* $Id: buildconfig.cpp 106061 2024-09-16 14:03:52Z vboxsync $ */
2/** @file
3 * IPRT - Build Configuration Information.
4 */
5
6/*
7 * Copyright (C) 2009-2024 Oracle and/or its affiliates.
8 *
9 * This file is part of VirtualBox base platform packages, as
10 * available from https://www.virtualbox.org.
11 *
12 * This program is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU General Public License
14 * as published by the Free Software Foundation, in version 3 of the
15 * License.
16 *
17 * This program is distributed in the hope that it will be useful, but
18 * WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20 * General Public License for more details.
21 *
22 * You should have received a copy of the GNU General Public License
23 * along with this program; if not, see <https://www.gnu.org/licenses>.
24 *
25 * The contents of this file may alternatively be used under the terms
26 * of the Common Development and Distribution License Version 1.0
27 * (CDDL), a copy of it is provided in the "COPYING.CDDL" file included
28 * in the VirtualBox distribution, in which case the provisions of the
29 * CDDL are applicable instead of those of the GPL.
30 *
31 * You may elect to license modified versions of this file under the
32 * terms and conditions of either the GPL or the CDDL or both.
33 *
34 * SPDX-License-Identifier: GPL-3.0-only OR CDDL-1.0
35 */
36
37
38/*********************************************************************************************************************************
39* Header Files *
40*********************************************************************************************************************************/
41#include "internal/iprt.h"
42#include <iprt/buildconfig.h>
43
44
45
46#ifdef IPRT_BLDCFG_SCM_REV
47RTDECL(uint32_t) RTBldCfgRevision(void)
48{
49 return IPRT_BLDCFG_SCM_REV;
50}
51
52
53RTDECL(const char *) RTBldCfgRevisionStr(void)
54{
55 return RT_XSTR(IPRT_BLDCFG_SCM_REV);
56}
57#endif
58
59
60#ifdef IPRT_BLDCFG_VERSION_STRING
61RTDECL(const char *) RTBldCfgVersion(void)
62{
63 return IPRT_BLDCFG_VERSION_STRING;
64}
65#endif
66
67
68#ifdef IPRT_BLDCFG_VERSION_MAJOR
69RTDECL(uint32_t) RTBldCfgVersionMajor(void)
70{
71 return IPRT_BLDCFG_VERSION_MAJOR;
72}
73#endif
74
75
76#ifdef IPRT_BLDCFG_VERSION_MINOR
77RTDECL(uint32_t) RTBldCfgVersionMinor(void)
78{
79 return IPRT_BLDCFG_VERSION_MINOR;
80}
81#endif
82
83
84#ifdef IPRT_BLDCFG_VERSION_BUILD
85RTDECL(uint32_t) RTBldCfgVersionBuild(void)
86{
87 return IPRT_BLDCFG_VERSION_BUILD;
88}
89#endif
90
91
92#ifdef IPRT_BLDCFG_TARGET
93RTDECL(const char *) RTBldCfgTarget(void)
94{
95 return IPRT_BLDCFG_TARGET;
96}
97#endif
98
99
100#ifdef IPRT_BLDCFG_TARGET_ARCH
101RTDECL(const char *) RTBldCfgTargetArch(void)
102{
103 return IPRT_BLDCFG_TARGET_ARCH;
104}
105#endif
106
107
108#if defined(IPRT_BLDCFG_TARGET) && defined(IPRT_BLDCFG_TARGET_ARCH)
109RTDECL(const char *) RTBldCfgTargetDotArch(void)
110{
111 return IPRT_BLDCFG_TARGET "." IPRT_BLDCFG_TARGET_ARCH;
112}
113#endif
114
115
116#ifdef IPRT_BLDCFG_TYPE
117RTDECL(const char *) RTBldCfgType(void)
118{
119 return IPRT_BLDCFG_TYPE;
120}
121#endif
122
123
124RTDECL(const char *) RTBldCfgCompiler(void)
125{
126#ifdef IPRT_BLDCFG_COMPILER
127 return IPRT_BLDCFG_COMPILER;
128#elif defined(__INTEL_COMPILER)
129 return "intel";
130#elif defined(__GNUC__)
131 return "gcc";
132#elif defined(__llvm__)
133 return "llvm";
134#elif defined(__SUNPRO_CC) || defined(__SUNPRO_C)
135 return "sunpro";
136#elif defined(__IBMCPP__) || defined(__IBMC__)
137# if defined(__COMPILER_VER__)
138 return "ibmzosc";
139# elif defined(__xlC__) || defined(__xlc__)
140 return "ibmxlc";
141# else
142 return "vac";
143# endif
144#elif defined(_MSC_VER)
145 return "vcc";
146#elif defined(__WATCOMC__)
147 return "watcom";
148#else
149# error "Unknown compiler"
150#endif
151}
152
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette