Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
DIVINE
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Analyze
Contributor analytics
CI/CD analytics
Repository analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
paradise
mirror
DIVINE
Commits
f8d2af74
There was an error fetching the commit references. Please try again later.
Commit
f8d2af74
authored
5 years ago
by
Zuzana Baranová
Browse files
Options
Downloads
Patches
Plain Diff
tools: Add dioscc (divcc with DiOS).
parent
8aa1ebcd
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tools/dioscc.cpp
+52
-0
52 additions, 0 deletions
tools/dioscc.cpp
with
52 additions
and
0 deletions
tools/dioscc.cpp
0 → 100644
+
52
−
0
View file @
f8d2af74
// -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 4 -*-
/*
* (c) 2017 Jan Horáček <me@apophis.cz>
* (c) 2017-2019 Zuzana Baranová <xbaranov@fi.muni.cz>
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#include
<divine/cc/cc1.hpp>
//CompileError
#include
<divine/cc/native.hpp>
#include
<divine/rt/dios-cc.hpp>
#include
<divine/rt/runtime.hpp>
#include
<divine/ui/version.hpp>
using
namespace
divine
;
/* usage: same as gcc */
int
main
(
int
argc
,
char
**
argv
)
{
try
{
rt
::
NativeDiosCC
nativeCC
(
{
argv
+
1
,
argv
+
argc
}
);
nativeCC
.
set_cxx
(
brick
::
string
::
endsWith
(
argv
[
0
],
"divc++"
)
);
auto
&
po
=
nativeCC
.
_po
;
if
(
po
.
hasHelp
||
po
.
hasVersion
)
{
nativeCC
.
print_info
(
ui
::
version
()
);
return
0
;
}
return
nativeCC
.
run
();
}
catch
(
cc
::
CompileError
&
err
)
{
std
::
cerr
<<
err
.
what
()
<<
std
::
endl
;
return
1
;
}
catch
(
std
::
runtime_error
&
err
)
{
std
::
cerr
<<
"compilation failed: "
<<
err
.
what
()
<<
std
::
endl
;
return
2
;
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment