Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
aabfd2dd
Commit
aabfd2dd
authored
Mar 03, 2020
by
Jacek Caban
Committed by
Alexandre Julliard
Mar 03, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winegcc: Add support for using clang directly.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
9a9f35a4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
6 deletions
+29
-6
winegcc.c
tools/winegcc/winegcc.c
+29
-6
No files found.
tools/winegcc/winegcc.c
View file @
aabfd2dd
...
...
@@ -325,20 +325,23 @@ enum tool
static
const
struct
{
const
char
*
base
;
const
char
*
llvm_base
;
const
char
*
deflt
;
}
tool_names
[]
=
{
{
"gcc"
,
CC
},
{
"g++"
,
CXX
},
{
"cpp"
,
CPP
},
{
"ld"
,
LD
},
{
"gcc"
,
"clang --driver-mode=gcc"
,
CC
},
{
"g++"
,
"clang --driver-mode=g++"
,
CXX
},
{
"cpp"
,
"clang --driver-mode=cpp"
,
CPP
},
{
"ld"
,
"ld.lld"
,
LD
},
};
static
strarray
*
build_tool_name
(
struct
options
*
opts
,
enum
tool
tool
)
{
const
char
*
base
=
tool_names
[
tool
].
base
;
const
char
*
llvm_base
=
tool_names
[
tool
].
llvm_base
;
const
char
*
deflt
=
tool_names
[
tool
].
deflt
;
const
char
*
path
;
strarray
*
ret
;
char
*
str
;
if
(
opts
->
target
&&
opts
->
version
)
...
...
@@ -357,8 +360,28 @@ static strarray* build_tool_name( struct options *opts, enum tool tool )
str
=
xstrdup
(
deflt
);
if
((
path
=
find_binary
(
opts
->
prefix
,
str
)))
return
strarray_fromstring
(
path
,
" "
);
error
(
"Could not find %s
\n
"
,
base
);
return
NULL
;
if
(
!
opts
->
version
)
str
=
xstrdup
(
llvm_base
);
else
str
=
strmake
(
"%s-%s"
,
llvm_base
,
opts
->
version
);
path
=
find_binary
(
opts
->
prefix
,
str
);
if
(
!
path
)
{
error
(
"Could not find %s
\n
"
,
base
);
return
NULL
;
}
ret
=
strarray_fromstring
(
path
,
" "
);
if
(
!
strncmp
(
llvm_base
,
"clang"
,
5
))
{
if
(
opts
->
target
)
{
strarray_add
(
ret
,
"-target"
);
strarray_add
(
ret
,
opts
->
target
);
}
strarray_add
(
ret
,
"-Wno-unused-command-line-argument"
);
strarray_add
(
ret
,
"-fuse-ld=lld"
);
}
return
ret
;
}
static
strarray
*
get_translator
(
struct
options
*
opts
)
...
...
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