Fix inplace build
build_dso for inplace mode copies DSO built in build/ into worktree. However if the destination directory does not exist yet, copy_file fails. Fix it by making sure before copying that destination directory exits. Without the fix added test fails as follows: ... creating build/lib.linux-x86_64-2.7 creating build/lib.linux-x86_64-2.7/dsodemo creating build/lib.linux-x86_64-2.7/dsodemo/lib x86_64-linux-gnu-g++ -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-z,relro -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -Wdate-time -D_FORTIFY_SOURCE=2 -g -fdebug-prefix-map=/build/python2.7-IbFBHb/python2.7-2.7.16=. -fstack-protector-strong -Wformat -Werror=format-security -Wl,-z,relro -Wdate-time -D_FORTIFY_SOURCE=2 -g -fdebug-prefix-map=/build/python2.7-IbFBHb/python2.7-2.7.16=. -fstack-protector-strong -Wformat -Werror=format-security build/temp.linux-x86_64-2.7/foo.o build/temp.linux-x86_64-2.7/bar.o -o build/lib.linux-x86_64-2.7/dsodemo/lib/libdemo.so.1.0 -Wl,-h,libdemo.so.1.0 symlink libdemo.so.1.0 -> build/lib.linux-x86_64-2.7/dsodemo/lib/libdemo.so.1.0 copying build/lib.linux-x86_64-2.7/dsodemo/lib/libdemo.so.1.0 -> dsodemo/lib error: [Errno 2] No such file or directory: 'dsodemo/lib/libdemo.so.1.0'
Showing
Please register or sign in to comment