View previous topic :: View next topic |
Author |
Message |
JJR
Joined: 22 Feb 2004 Posts: 1104
|
Posted: Tue May 17, 2005 8:27 pm Post subject: pragma(nolink) |
|
|
(linux version)
I'm using pragma(nolink) in a top level build file that I call build.d for a project.
I use build.d to explicitly import all files in the a project that is to be made into a library:
I build the library like so:
build build.d -allobj
I do not want build.o to be included in the resulting library. It's merely there to direct the build tool.
pragma(nolink) in that file is not effective in preventing this. Is this a bug? Can you fix this?
- John |
|
Back to top |
|
|
JJR
Joined: 22 Feb 2004 Posts: 1104
|
Posted: Tue May 17, 2005 9:00 pm Post subject: |
|
|
In fact... build appears to ignoring any
version(build) pragma(nolinks) in the files. |
|
Back to top |
|
|
JJR
Joined: 22 Feb 2004 Posts: 1104
|
Posted: Tue May 17, 2005 11:14 pm Post subject: |
|
|
Okay... this a problem on windows also. It must be due to my using -allobj switch.
I need to use allobj switch or build will no add any library files to the library.
What do I do?
-JJR |
|
Back to top |
|
|
Derek Parnell
Joined: 22 Apr 2004 Posts: 408 Location: Melbourne, Australia
|
Posted: Wed May 18, 2005 2:30 am Post subject: |
|
|
JJR wrote: | Okay... this a problem on windows also. It must be due to my using -allobj switch.
I need to use allobj switch or build will no add any library files to the library.
What do I do?
-JJR |
Its my problem. That pragma was only envisioned to be used in source files that didn't need to be compiled. These would be files that were only ever imported and their OBJ file was never needed. The way you are using it means that whenever one of the imported source files is modifed, it would force the compile of all files that referenced that source file.
I can fix it to do what you need, but I have to split the compile step from the link step. I'll see if I can have something ready for tomorrow. _________________ --
Derek
skype name: derek.j.parnell |
|
Back to top |
|
|
JJR
Joined: 22 Feb 2004 Posts: 1104
|
Posted: Wed May 18, 2005 11:04 pm Post subject: |
|
|
Derek Parnell wrote: | Its my problem. That pragma was only envisioned to be used in source files that didn't need to be compiled. These would be files that were only ever imported and their OBJ file was never needed. The way you are using it means that whenever one of the imported source files is modifed, it would force the compile of all files that referenced that source file.
|
Ah I see now. I figured it would have duplicate compile paths, but I put up with it because I like the clarity of seeing the exact modules that would be compiled for my library.
Derek Parnell wrote: | I can fix it to do what you need, but I have to split the compile step from the link step. I'll see if I can have something ready for tomorrow. |
That would be wonderful. Thank you for your help! Take your time. I have lots to do in the meantime.
-JJR |
|
Back to top |
|
|
|