Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
b253bd65
Commit
b253bd65
authored
Feb 21, 2020
by
Jacek Caban
Committed by
Alexandre Julliard
Feb 21, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winegcc: Clean up output file on error.
Based on winebuild. Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
b0ea67ed
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
0 deletions
+10
-0
winegcc.c
tools/winegcc/winegcc.c
+10
-0
No files found.
tools/winegcc/winegcc.c
View file @
b253bd65
...
@@ -139,6 +139,7 @@ static const char* app_loader_template =
...
@@ -139,6 +139,7 @@ static const char* app_loader_template =
"exec
\"
$WINELOADER
\"
\"
$apppath
\"
\"
$@
\"\n
"
"exec
\"
$WINELOADER
\"
\"
$apppath
\"
\"
$@
\"\n
"
;
;
static
const
char
*
output_file_name
;
static
int
keep_generated
=
0
;
static
int
keep_generated
=
0
;
static
strarray
*
tmp_files
;
static
strarray
*
tmp_files
;
#ifdef HAVE_SIGSET_T
#ifdef HAVE_SIGSET_T
...
@@ -262,6 +263,11 @@ static enum target_platform build_platform = PLATFORM_WINDOWS;
...
@@ -262,6 +263,11 @@ static enum target_platform build_platform = PLATFORM_WINDOWS;
static
enum
target_platform
build_platform
=
PLATFORM_UNSPECIFIED
;
static
enum
target_platform
build_platform
=
PLATFORM_UNSPECIFIED
;
#endif
#endif
static
void
cleanup_output_files
(
void
)
{
if
(
output_file_name
)
unlink
(
output_file_name
);
}
static
void
clean_temp_files
(
void
)
static
void
clean_temp_files
(
void
)
{
{
unsigned
int
i
;
unsigned
int
i
;
...
@@ -1305,6 +1311,9 @@ static void build(struct options* opts)
...
@@ -1305,6 +1311,9 @@ static void build(struct options* opts)
if
(
libgcc
)
strarray_add
(
link_args
,
libgcc
);
if
(
libgcc
)
strarray_add
(
link_args
,
libgcc
);
output_file_name
=
output_path
;
atexit
(
cleanup_output_files
);
spawn
(
opts
->
prefix
,
link_args
,
0
);
spawn
(
opts
->
prefix
,
link_args
,
0
);
strarray_free
(
link_args
);
strarray_free
(
link_args
);
...
@@ -1836,5 +1845,6 @@ int main(int argc, char **argv)
...
@@ -1836,5 +1845,6 @@ int main(int argc, char **argv)
else
if
(
linking
)
build
(
&
opts
);
else
if
(
linking
)
build
(
&
opts
);
else
compile
(
&
opts
,
lang
);
else
compile
(
&
opts
,
lang
);
output_file_name
=
NULL
;
return
0
;
return
0
;
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment