It seems to me, the last phenomena is explained by swift compiler bug. Let us look into clang/lib/Lex/ModuleMap.cpp source file, method parseHeaderDecl. We can find, for example, following lines: if (llvm::sys::path::is_absolute(Header.FileName)) { RelativePathName = Header.FileName; File = SourceMgr.getFileManager().getFile(RelativePathName); } We can see, that sysroot (or isysroot) argument is ignored. What can you say about that?
25.03.2016, 12:21, "Труб Илья via swift-dev" <swift-dev@swift.org>: > Yes, Dmitry. I found corresponding module.map for arm and placed it into > glibs subdirectory of my swiftc's include path. It was found. But, it seems > to me, sysroot argument is not applied to paths, written in that module.map > or I do not how to correct do that. > I add to swift command-line following option: > -Xcc "-sysroot <msysroot>", but now I get error: > > <my swift include path>/glibc/module.map:187:14: error: header > '/usr/include/sys/ioctl.h' not found > header "/usr/include/sys/ioctl.h" > ^ > <unknown>:0: error: could not build Objective-C module 'SwiftGlibc' > > I checked, that file <mysysroot>/usr/include/sys/ioctl.h actually exists. > Could you hint, what I do wrong? > > 25.03.2016, 01:15, "Dmitri Gribenko" <griboz...@gmail.com>: >> Then you should have a module map for Glibc in the build products. >> >> Dmitri >> >> On Thu, Mar 24, 2016 at 2:32 PM, Труб Илья <it...@yandex.ru> wrote: >>> I have built all targets for arm (including modules and libraries) within >>> the native arm environment on arm-emulator with chroot. >>> >>> 25.03.2016, 00:25, "Dmitri Gribenko" <griboz...@gmail.com>: >>>> On Thu, Mar 24, 2016 at 2:03 PM, Труб Илья <it...@yandex.ru> wrote: >>>>> Thanks for your answer, Dmitry. I will look for examples of module >>>>> maps in test sources. >>>> >>>> You shouldn't need to. If you have built Swift for arm, you should >>>> have the right one produced by the build system. >>>> >>>> How did you compile the standard library for arm? >>>> >>>> Dmitri >>>> >>>> -- >>>> main(i,j){for(i=2;;i++){for(j=2;j<i;j++){if(!(i%j)){j=0;break;}}if >>>> (j){printf("%d\n",i);}}} /*Dmitri Gribenko <griboz...@gmail.com>*/ >> >> -- >> main(i,j){for(i=2;;i++){for(j=2;j<i;j++){if(!(i%j)){j=0;break;}}if >> (j){printf("%d\n",i);}}} /*Dmitri Gribenko <griboz...@gmail.com>*/ > > _______________________________________________ > swift-dev mailing list > swift-dev@swift.org > https://lists.swift.org/mailman/listinfo/swift-dev _______________________________________________ swift-dev mailing list swift-dev@swift.org https://lists.swift.org/mailman/listinfo/swift-dev