Shop OBEX P1 Docs P2 Docs Learn Events
Special Compilation Rules for Simple Library — Parallax Forums

Special Compilation Rules for Simple Library

I just found out via another thread that wavplayer.c is supposed to be compiled with -O3, not -Os like most C/C++ source files for the Propeller. Are there any other special rules for compiling Simple?

Comments

  • @jazzed, do you by chance know the answer to this question?
  • Heater.Heater. Posts: 21,230
    I would seriously hope that a library will work at any optimization setting.

  • Heater. wrote: »
    I would seriously hope that a library will work at any optimization setting.
    Well, anything that is timing-critical could require a high optimization level. It would compile at a lower level but might not meet timing.

  • Heater.Heater. Posts: 21,230
    Quite so.

    Perhaps such things should not be in any standard library. They are probably drivers.

    Or perhaps they should be supplied as precompiled objects. Compiled with the right optimizations to get them to work.

    Point is, this should not be yet another detail for an application programmer to have to worry about.



  • Heater. wrote: »
    Quite so.

    Perhaps such things should not be in any standard library. They are probably drivers.

    Or perhaps they should be supplied as precompiled objects. Compiled with the right optimizations to get them to work.

    Point is, this should not be yet another detail for an application programmer to have to worry about.

    Agreed. I'm asking this question on behalf of PropWare though, and I don't know if you want to consider PropWare an "application programmer."
    Once PropWare has all the rules tied down, I'll be able to provide Simple as a precompiled library, and that should satisfy your points :)
  • edited 2016-02-11 23:59
    Hi DavidZemon,

    Sorry, I missed this thread.

    The wavplayer is the only library where this change was made. There's nothing else in Simple Libraries that has different optimization.

    Any example code that includes the wavplayer library can also use the default optimization. It was only necessary to tweak the optimization within that particular library before compiling, but not in applications that use it.

    Andy
  • Wonderful! This is good to know.
Sign In or Register to comment.