Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
ccan
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
mirror
ccan
Commits
b401a01a
Commit
b401a01a
authored
Mar 01, 2011
by
Rusty Russell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ccanlint: compile module with reduced-feature config.h
parent
dfc94d4a
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
35 additions
and
4 deletions
+35
-4
tools/ccanlint/compulsory_tests/build.h
tools/ccanlint/compulsory_tests/build.h
+2
-0
tools/ccanlint/compulsory_tests/module_builds.c
tools/ccanlint/compulsory_tests/module_builds.c
+1
-0
tools/ccanlint/compulsory_tests/objects_build.c
tools/ccanlint/compulsory_tests/objects_build.c
+11
-4
tools/ccanlint/tests/objects_build_without_features.c
tools/ccanlint/tests/objects_build_without_features.c
+21
-0
No files found.
tools/ccanlint/compulsory_tests/build.h
View file @
b401a01a
...
...
@@ -2,4 +2,6 @@
#define CCANLINT_BUILD_H
char
*
build_module
(
struct
manifest
*
m
,
bool
keep
,
char
**
errstr
);
char
*
build_submodule
(
struct
manifest
*
m
);
void
build_objects
(
struct
manifest
*
m
,
bool
keep
,
struct
score
*
score
,
const
char
*
flags
);
#endif
/* CCANLINT_BUILD_H */
tools/ccanlint/compulsory_tests/module_builds.c
View file @
b401a01a
...
...
@@ -82,3 +82,4 @@ struct ccanlint module_builds = {
};
REGISTER_TEST
(
module_builds
);
tools/ccanlint/compulsory_tests/objects_build.c
View file @
b401a01a
...
...
@@ -13,6 +13,7 @@
#include <err.h>
#include <string.h>
#include <ctype.h>
#include "build.h"
static
const
char
*
can_build
(
struct
manifest
*
m
)
{
...
...
@@ -21,9 +22,8 @@ static const char *can_build(struct manifest *m)
return
NULL
;
}
static
void
check_objs_build
(
struct
manifest
*
m
,
bool
keep
,
unsigned
int
*
timeleft
,
struct
score
*
score
)
void
build_objects
(
struct
manifest
*
m
,
bool
keep
,
struct
score
*
score
,
const
char
*
flags
)
{
struct
ccan_file
*
i
;
bool
errors
=
false
,
warnings
=
false
;
...
...
@@ -38,7 +38,7 @@ static void check_objs_build(struct manifest *m,
char
*
fullfile
=
talloc_asprintf
(
m
,
"%s/%s"
,
m
->
dir
,
i
->
name
);
i
->
compiled
=
maybe_temp_file
(
m
,
""
,
keep
,
fullfile
);
if
(
!
compile_object
(
score
,
fullfile
,
ccan_dir
,
compiler
,
c
flags
,
if
(
!
compile_object
(
score
,
fullfile
,
ccan_dir
,
compiler
,
flags
,
i
->
compiled
,
&
output
))
{
talloc_free
(
i
->
compiled
);
score_file_error
(
score
,
i
,
0
,
...
...
@@ -60,6 +60,13 @@ static void check_objs_build(struct manifest *m,
}
}
static
void
check_objs_build
(
struct
manifest
*
m
,
bool
keep
,
unsigned
int
*
timeleft
,
struct
score
*
score
)
{
build_objects
(
m
,
keep
,
score
,
cflags
);
}
struct
ccanlint
objects_build
=
{
.
key
=
"objects_build"
,
.
name
=
"Module object files can be built"
,
...
...
tools/ccanlint/tests/objects_build_without_features.c
0 → 100644
View file @
b401a01a
#include <tools/ccanlint/ccanlint.h>
#include <ccan/talloc/talloc.h>
#include "../compulsory_tests/build.h"
static
void
check_objs_build_without_features
(
struct
manifest
*
m
,
bool
keep
,
unsigned
int
*
timeleft
,
struct
score
*
score
)
{
const
char
*
flags
=
talloc_asprintf
(
score
,
"-I. %s"
,
cflags
);
build_objects
(
m
,
keep
,
score
,
flags
);
}
struct
ccanlint
objects_build_without_features
=
{
.
key
=
"objects_build_without_features"
,
.
name
=
"Module object files can be built (without features)"
,
.
check
=
check_objs_build_without_features
,
.
needs
=
"reduce_features objects_build"
};
REGISTER_TEST
(
objects_build_without_features
);
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