Skip to content
Snippets Groups Projects
Commit 8521b31b authored by Hugues Cassé's avatar Hugues Cassé
Browse files

hai: small fix.

parent d8baf12e
No related branches found
No related tags found
No related merge requests found
...@@ -463,7 +463,7 @@ Edge *HalfAbsInt<FixPoint>::detectCalls(bool &enter_call, Vector<Edge*> &call_ed ...@@ -463,7 +463,7 @@ Edge *HalfAbsInt<FixPoint>::detectCalls(bool &enter_call, Vector<Edge*> &call_ed
Edge *next_edge = 0; Edge *next_edge = 0;
enter_call = true; enter_call = true;
call_edges.clear(); call_edges.clear();
for(Block::EdgeIter outedge = bb->outs(); outedge; outedge++) for(Block::EdgeIter outedge = bb->outs(); outedge(); outedge++)
// TODO special support with unknown sink is needed here // TODO special support with unknown sink is needed here
if(outedge->sink()->isSynth() && !HAI_DONT_ENTER(outedge->sink()->toSynth()->callee())) { if(outedge->sink()->isSynth() && !HAI_DONT_ENTER(outedge->sink()->toSynth()->callee())) {
call_edges.add(*outedge); call_edges.add(*outedge);
......
...@@ -240,17 +240,17 @@ protected: ...@@ -240,17 +240,17 @@ protected:
// display C flags // display C flags
if(cflags) { if(cflags) {
cout << "-I" << MANAGER.prefixPath() / "include" << io::endl; cout << quote(_ << "-I" << MANAGER.prefixPath() / "include") << io::endl;
return; return;
} }
// output libs // output libs
if(libs) { if(libs) {
cout << "-L" << getLibDir() << " -lotawa -lelm -lgel"; cout << quote (_ << "-L" << getLibDir()) << " -lotawa -lelm -lgel";
// output dependencies // output dependencies
for(elm::Vector<sys::Plugin *>::Iter p = plugs; p(); p++) for(elm::Vector<sys::Plugin *>::Iter p = plugs; p(); p++)
cout << ' ' << p->path(); cout << ' ' << quote(p->path());
// output RPath // output RPath
if(rpath) { if(rpath) {
...@@ -263,9 +263,9 @@ protected: ...@@ -263,9 +263,9 @@ protected:
if(!rpaths.contains(rpath)) { if(!rpaths.contains(rpath)) {
rpaths.add(rpath); rpaths.add(rpath);
if(make_app) if(make_app)
cout << " -Wl,-rpath -Wl," << rpath; cout << " -Wl,-rpath " << quote(_ << "-Wl," << rpath);
else else
cout << " -Wl,-rpath -Wl," << rpath; cout << " -Wl,-rpath " << quote(_ << "-Wl," << rpath);
} }
} }
} }
...@@ -276,6 +276,18 @@ protected: ...@@ -276,6 +276,18 @@ protected:
private: private:
/**
* Put quotes around text containing spaces or tabulations.
* @param s String to quote.
* @return Quoted string if needed.
*/
string quote(string s) {
for(auto c: s)
if(c == ' ' || c == '\r')
return _ << '\'' << s << '\'';
return s;
}
/** /**
* Lookup for a local plugin. * Lookup for a local plugin.
* @param ppath Plugin path. * @param ppath Plugin path.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment