Skip to content

Commit 7a743bb

Browse files
committed
Only build embedded if explicitly requested and possible.
autotest option now no longer turn on embedded server build. This reduces the binary distribution size significantly, and there are no autotest suites testing embedded server anyway. In newer releases the option, WITH_EMBEDDED_SERVER, is removed. The compiler-cluster script checks if libmysqld directory exists in source. If not it assumed that there is no WITH_EMBEDDED_SERVER option, and none is passed to cmake which would otherwise give a warning.
1 parent ad67aac commit 7a743bb

File tree

1 file changed

+18
-2
lines changed

1 file changed

+18
-2
lines changed

storage/ndb/compile-cluster

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/perl
22

3-
# Copyright (c) 2012, 2014, Oracle and/or its affiliates. All rights reserved.
3+
# Copyright (c) 2012, 2017, Oracle and/or its affiliates. All rights reserved.
44
#
55
# This program is free software; you can redistribute it and/or modify
66
# it under the terms of the GNU General Public License as published by
@@ -37,6 +37,7 @@ $| = 1;
3737
my $opt_debug;
3838
my $opt_build_type;
3939
my $opt_build = 1;
40+
my $opt_embedded = 0;
4041
my $opt_just_print;
4142
my $opt_vanilla;
4243
my $opt_autotest;
@@ -57,6 +58,7 @@ GetOptions(
5758
'autotest' => \$opt_autotest,
5859
'valgrind' => \$opt_valgrind,
5960
'distcheck' => \$opt_distcheck,
61+
'embedded' => sub { $opt_embedded = 1; },
6062

6163
# Special switch --parse-log=<file> which reads a log file (from build) and
6264
# parses it for warnings
@@ -107,6 +109,16 @@ my $cmake_version_id;
107109
}
108110

109111

112+
# If no libmysqld directory in source, there is support for build embedded server.
113+
if(! -d "$opt_srcdir/libmysqld")
114+
{
115+
if($opt_embedded)
116+
{
117+
die "Build with embedded server is not possible";
118+
}
119+
$opt_embedded = undef;
120+
}
121+
110122
#
111123
# Configure
112124
#
@@ -146,7 +158,11 @@ my $cmake_version_id;
146158
{
147159
print("compile-cluster: autotest build requested, extra everything\n");
148160
push(@args, "-DWITH_NDB_CCFLAGS='-DERROR_INSERT'");
149-
push(@args, "-DWITH_EMBEDDED_SERVER=1");
161+
}
162+
163+
if (defined $opt_embedded)
164+
{
165+
push(@args, "-DWITH_EMBEDDED_SERVER=$opt_embedded");
150166
}
151167

152168
if ($opt_valgrind)

0 commit comments

Comments
 (0)