script/vagrant: split into functions - clear cflags
Signed-off-by: Pawel Piatek <pawelx.piatek@intel.com> Change-Id: I8842fda241403d7bfc0ec0da144848777d44921a Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3714 Community-CI: Mellanox Build Bot Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Karol Latecki <karol.latecki@intel.com> Reviewed-by: Maciej Wawryk <maciejx.wawryk@intel.com> Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com>
This commit is contained in:
parent
d0426c8775
commit
dc7f3206a1
26
scripts/vagrant/Vagrantfile
vendored
26
scripts/vagrant/Vagrantfile
vendored
@ -113,6 +113,17 @@ def make_spdk_local_copy_of_nfs(config,distro)
|
||||
config.vm.provision "shell", inline: $spdk_repo_cmd
|
||||
end
|
||||
|
||||
def clear_cflags(config)
|
||||
$clearcflags_cmd = <<-SCRIPT
|
||||
echo "export CFLAGS=" >> /etc/profile.d/clearcflags.sh
|
||||
echo "export CFFLAGS=" >> /etc/profile.d/clearcflags.sh
|
||||
echo "export CXXFLAGS=" >> /etc/profile.d/clearcflags.sh
|
||||
echo "export FFLAGS=" >> /etc/profile.d/clearcflags.sh
|
||||
echo "export THEANO_FLAGS=" >> /etc/profile.d/clearcflags.sh
|
||||
SCRIPT
|
||||
config.vm.provision "shell", inline: $clearcflags_cmd, run: "always"
|
||||
end
|
||||
|
||||
Vagrant.configure(2) do |config|
|
||||
|
||||
# Pick the right distro and bootstrap, default is fedora30
|
||||
@ -178,6 +189,9 @@ Vagrant.configure(2) do |config|
|
||||
# use http proxy if avaiable
|
||||
setup_proxy(config, distro)
|
||||
|
||||
# Clear CFLAGS in clear linux
|
||||
clear_cflags(config) if distro == 'clearlinux'
|
||||
|
||||
# freebsd and clearlinux boxes in order to have spdk sources synced from
|
||||
# host properly will use NFS with "ro" option enabled to prevent changes
|
||||
# on host filesystem.
|
||||
@ -297,16 +311,4 @@ Vagrant.configure(2) do |config|
|
||||
setup.args = ["-u", "-i"]
|
||||
end
|
||||
end
|
||||
|
||||
# Clear CFLAGS in clear linux
|
||||
if distro == "clearlinux"
|
||||
$clearcflags = <<-SCRIPT
|
||||
echo "export CFLAGS=" >> /etc/profile.d/clearcflags.sh
|
||||
echo "export CFFLAGS=" >> /etc/profile.d/clearcflags.sh
|
||||
echo "export CXXFLAGS=" >> /etc/profile.d/clearcflags.sh
|
||||
echo "export FFLAGS=" >> /etc/profile.d/clearcflags.sh
|
||||
echo "export THEANO_FLAGS=" >> /etc/profile.d/clearcflags.sh
|
||||
SCRIPT
|
||||
config.vm.provision "shell", inline: $clearcflags, run: "always"
|
||||
end
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user