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
5f0796db
Commit
5f0796db
authored
Mar 02, 2004
by
Dimitrie O. Paun
Committed by
Alexandre Julliard
Mar 02, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add support for passing options to winebuild via -Wb.
Generate only the loader script when given just the .exe.so. Add function to delete element from a strarray.
parent
3e61ef7d
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
1 deletion
+24
-1
utils.c
tools/winegcc/utils.c
+7
-0
utils.h
tools/winegcc/utils.h
+1
-0
winegcc.c
tools/winegcc/winegcc.c
+16
-1
No files found.
tools/winegcc/utils.c
View file @
5f0796db
...
...
@@ -118,6 +118,13 @@ void strarray_add(strarray* arr, const char* str)
arr
->
base
[
arr
->
size
++
]
=
str
;
}
void
strarray_del
(
strarray
*
arr
,
int
i
)
{
if
(
i
<
0
||
i
>=
arr
->
size
)
error
(
"Invalid index i=%d"
,
i
);
memmove
(
&
arr
->
base
[
i
],
&
arr
->
base
[
i
+
1
],
(
arr
->
size
-
i
-
1
)
*
sizeof
(
arr
->
base
[
0
]));
arr
->
size
--
;
}
void
strarray_addall
(
strarray
*
arr
,
const
strarray
*
from
)
{
int
i
;
...
...
tools/winegcc/utils.h
View file @
5f0796db
...
...
@@ -48,6 +48,7 @@ strarray* strarray_alloc(void);
strarray
*
strarray_dup
(
const
strarray
*
arr
);
void
strarray_free
(
strarray
*
arr
);
void
strarray_add
(
strarray
*
arr
,
const
char
*
str
);
void
strarray_del
(
strarray
*
arr
,
int
i
);
void
strarray_addall
(
strarray
*
arr
,
const
strarray
*
from
);
strarray
*
strarray_fromstring
(
const
char
*
str
,
const
char
*
delim
);
char
*
strarray_tostring
(
const
strarray
*
arr
,
const
char
*
sep
);
...
...
tools/winegcc/winegcc.c
View file @
5f0796db
...
...
@@ -165,6 +165,7 @@ struct options
strarray
*
lib_dirs
;
strarray
*
linker_args
;
strarray
*
compiler_args
;
strarray
*
winebuild_args
;
strarray
*
files
;
};
...
...
@@ -336,8 +337,8 @@ static void build(struct options* opts)
char
*
spec_c_name
,
*
spec_o_name
,
*
base_file
,
*
base_name
;
const
char
*
output_name
;
const
char
*
winebuild
=
getenv
(
"WINEBUILD"
);
int
j
;
int
generate_app_loader
=
1
;
int
j
;
if
(
!
winebuild
)
winebuild
=
"winebuild"
;
...
...
@@ -361,6 +362,9 @@ static void build(struct options* opts)
if
((
base_name
=
strrchr
(
base_file
,
'/'
)))
base_name
++
;
else
base_name
=
base_file
;
if
(
opts
->
files
->
size
==
1
&&
strendswith
(
opts
->
files
->
base
[
0
],
".exe.so"
))
goto
only_app_loader
;
/* prepare the linking path */
lib_dirs
=
strarray_dup
(
opts
->
lib_dirs
);
for
(
j
=
0
;
j
<
sizeof
(
stdlibpath
)
/
sizeof
(
stdlibpath
[
0
]);
j
++
)
...
...
@@ -447,6 +451,9 @@ static void build(struct options* opts)
for
(
j
=
0
;
j
<
lib_paths
->
size
;
j
++
)
strarray_add
(
spec_args
,
lib_paths
->
base
[
j
]);
for
(
j
=
0
;
j
<
opts
->
winebuild_args
->
size
;
j
++
)
strarray_add
(
spec_args
,
opts
->
winebuild_args
->
base
[
j
]);
for
(
j
=
0
;
j
<
dll_libs
->
size
;
j
++
)
strarray_add
(
spec_args
,
dll_libs
->
base
[
j
]);
...
...
@@ -504,6 +511,7 @@ static void build(struct options* opts)
spawn
(
link_args
);
/* create the loader script */
only_app_loader:
if
(
generate_app_loader
)
{
create_file
(
base_file
,
app_loader_template
,
base_name
);
...
...
@@ -614,6 +622,7 @@ int main(int argc, char **argv)
opts
.
files
=
strarray_alloc
();
opts
.
linker_args
=
strarray_alloc
();
opts
.
compiler_args
=
strarray_alloc
();
opts
.
winebuild_args
=
strarray_alloc
();
/* determine the processor type */
if
(
strendswith
(
argv
[
0
],
"winecpp"
))
opts
.
processor
=
proc_pp
;
...
...
@@ -749,6 +758,12 @@ int main(int argc, char **argv)
if
(
strstr
(
argv
[
i
],
"-static"
))
linking
=
-
1
;
}
else
if
(
strncmp
(
"-Wb,"
,
argv
[
i
],
4
)
==
0
)
{
strarray
*
Wb
=
strarray_fromstring
(
argv
[
i
]
+
4
,
","
);
strarray_addall
(
opts
.
winebuild_args
,
Wb
);
strarray_free
(
Wb
);
}
break
;
case
'-'
:
if
(
strcmp
(
"-static"
,
argv
[
i
]
+
1
)
==
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