188 ctx.addLibraryName(lib); 189 } 190 } 191 192 boolean infer_rpath = options.has("infer-rpath"); 193 if (options.has("rpath")) { 194 if (infer_rpath) { 195 //conflicting rpaths options 196 ctx.err.println(format("warn.rpath.auto.conflict")); 197 infer_rpath = false; 198 } 199 200 // "rpath" with no "l" option! 201 if (options.has("l")) { 202 options.valuesOf("rpath").forEach(p -> ctx.addLibraryPath((String) p)); 203 } else { 204 ctx.err.println(format("warn.rpath.without.l")); 205 } 206 } 207 208 if (options.has("exclude-symbols")) { 209 try { 210 options.valuesOf("exclude-symbols").forEach(sym -> ctx.addExcludeSymbols((String) sym)); 211 } catch (PatternSyntaxException pse) { 212 ctx.err.println(format("exclude.symbols.pattern.error", pse.getMessage())); 213 } 214 } 215 216 if (options.has("L")) { 217 List<?> libpaths = options.valuesOf("L"); 218 // "L" with no "l" option! 219 if (options.has("l")) { 220 libpaths.forEach(p -> ctx.addLinkCheckPath((String) p)); 221 if (infer_rpath) { 222 libpaths.forEach(p -> ctx.addLibraryPath((String) p)); 223 } 224 } else { 225 ctx.err.println(format("warn.L.without.l")); 226 } 227 } else if (infer_rpath) { | 188 ctx.addLibraryName(lib); 189 } 190 } 191 192 boolean infer_rpath = options.has("infer-rpath"); 193 if (options.has("rpath")) { 194 if (infer_rpath) { 195 //conflicting rpaths options 196 ctx.err.println(format("warn.rpath.auto.conflict")); 197 infer_rpath = false; 198 } 199 200 // "rpath" with no "l" option! 201 if (options.has("l")) { 202 options.valuesOf("rpath").forEach(p -> ctx.addLibraryPath((String) p)); 203 } else { 204 ctx.err.println(format("warn.rpath.without.l")); 205 } 206 } 207 208 // generate static forwarder class if user specified -l option 209 ctx.setGenStaticForwarder(options.has("l")); 210 211 if (options.has("exclude-symbols")) { 212 try { 213 options.valuesOf("exclude-symbols").forEach(sym -> ctx.addExcludeSymbols((String) sym)); 214 } catch (PatternSyntaxException pse) { 215 ctx.err.println(format("exclude.symbols.pattern.error", pse.getMessage())); 216 } 217 } 218 219 if (options.has("L")) { 220 List<?> libpaths = options.valuesOf("L"); 221 // "L" with no "l" option! 222 if (options.has("l")) { 223 libpaths.forEach(p -> ctx.addLinkCheckPath((String) p)); 224 if (infer_rpath) { 225 libpaths.forEach(p -> ctx.addLibraryPath((String) p)); 226 } 227 } else { 228 ctx.err.println(format("warn.L.without.l")); 229 } 230 } else if (infer_rpath) { |